<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>bosdyn.client.graph_nav &mdash; Spot 5.0.1.1 documentation</title>
      <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
      <link rel="stylesheet" href="../../../_static/style.css" type="text/css" />
    <link rel="shortcut icon" href="../../../_static/bd-favicon.png"/>
    <link rel="canonical" href="https://dev.bostondynamics.com/_modules/bosdyn/client/graph_nav.html" />
  <!--[if lt IE 9]>
    <script src="../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
        <script src="../../../_static/jquery.js"></script>
        <script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/doctools.js"></script>
        <script src="../../../_static/sphinx_highlight.js"></script>
    <script src="../../../_static/js/theme.js"></script>
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >

          
          
          <a href="../../../README.html">
            
              <img src="../../../_static/bd-official-white.png" class="logo" alt="Logo"/>
          </a>
              <div class="version">
                5.0.1.1
              </div>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <ul>
<li class="toctree-l1"><a class="reference internal" href="../../../docs/concepts/README.html">Concepts</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/about_spot.html">About Spot</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/orbit/about_orbit.html">About Orbit (formerly Scout)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/orbit/orbit_api.html">Orbit API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/networking.html">Networking</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/base_services.html">Base services</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/geometry_and_frames.html">Geometry and Frames</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/robot_services.html">Robot services</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/estop_service.html">E-Stop</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/keepalive_service.html">KeepAlive (BETA)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/audio_visual.html">Audio Visual</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/lease_service.html">Lease</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/developing_api_services.html">Developing API Services</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/service_customization.html">Service Customization</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/faults.html">Faults</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/autonomy/README.html">Autonomy services</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/graphnav_tech_summary.html">Autonomy Technical Summary</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/autonomous_navigation_code_examples.html">Autonomous navigation code examples</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/components_of_autonomous_navigation.html">Components of autonomous navigation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/docking.html">Docking</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/typical_autonomous_navigation_use_case.html">Typical autonomous navigation use case</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/autonomous_navigation_services.html">Autonomous navigation services</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/graphnav_service.html">GraphNav service</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/graphnav_map_structure.html">GraphNav map structure</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/graphnav_area_callbacks.html">GraphNav area callbacks</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/initialization.html">Initialization</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/localization.html">Localization</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/graphnav_and_robot_locomotion.html">GraphNav and robot locomotion</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/missions_service.html">Missions service</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/autowalk_service.html">Autowalk service</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/network_compute_bridge.html">Network compute bridge</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/auto_return.html">AutoReturn service</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/directed_exploration.html">Directed Exploration</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/autonomy/gps.html">GPS</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/choreography/README.html">Choreography</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/choreography/choreography_service.html">Choreography Service</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/choreography/move_reference.html">Move Reference Guide</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/choreography/custom_gait.html">CustomGait Reference</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/choreography/choreographer_setup.html">Choreographer Setup</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/choreography/choreographer.html">Choreographer Overview</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/choreography/robot_controls_in_choreographer.html">Robot Connections in Choreographer</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/choreography/animations_in_choreographer.html">Animations in Choreography</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/choreography/animation_file_specification.html">Animation File Format</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/choreography/choreography_in_tablet.html">Tablet Choreography Mode</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/choreography/choreography_in_autowalk.html">Choreography Actions in Autowalk</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/joint_control/README.html">Joint Control API</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/joint_control/supplemental_data.html">Supplemental Robot Information</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../docs/concepts/joint_control/knee_torque_limits.html">Knee Torque Limits</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/arm/README.html">Spot Arm</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/arm/arm_specification.html">Arm and Gripper Specification</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/arm/arm_concepts.html">Concepts</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/arm/arm_services.html">Services</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/concepts/data.html">Spot Data</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/data_acquisition_overview.html">Data Acquisition Overview</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/data_acquisition_output.html">Data Acquisition Output</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/writing_services_for_data_acquisition.html">Integrate Payloads with the API</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/data_buffer_overview.html">Data Buffer Overview</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/bddf.html">BDDF File Format</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/concepts/data_acquisition_thermal_raw.html">Thermal Raw Data Format</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../docs/python/README.html">Python</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/python/quickstart.html">Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/python/understanding_spot_programming.html">Understanding Spot Programming</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../python/examples/README.html">Examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../python/examples/docs/basic_service_examples.html">Basic Service Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/hello_spot/README.html">Hello Spot</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/directory/README.html">Directory</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/get_robot_state/README.html">Get Robot State</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/get_robot_state_async/README.html">Get Robot State Async</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/get_image/README.html">Get Image</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/get_world_objects/README.html">Get World Objects</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/get_mission_state/README.html">Get Mission State</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/estop/README.html">E-Stop</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/time_sync/README.html">Time Sync</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/comms_test/README.html">Comms Test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/disable_ir_emission/README.html">IR Enable/Disable</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/reset_safety_stop/README.html">Reset Safety Stop</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/audio_visual/audio_visual_params/README.html">Audio Visual Params</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/audio_visual/audio_visual_behaviors/README.html">Audio Visual Behaviors</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/examples/docs/robot_behavior_examples.html">Robot Behavior and Commands Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/stance/README.html">Stance</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/frame_trajectory_command/README.html">Frame Trajectory</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/spot_light/README.html">Spot Light</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/upload_choreographed_sequence/README.html">Upload Choreographed Sequence</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/xbox_controller/README.html">Xbox Controller</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/wasd/README.html">WASD</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/docking/README.html">Docking</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/animation_recorder/README.html">Animation Recorder</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/auto_return/README.html">Auto Return</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/fan_command/README.html">Fan Commands</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_wasd/README.html">ARM WASD</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/examples/docs/arm_examples.html">Arm Command Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_simple/README.html">Simple Arm Motion</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_stow_unstow/README.html">Stow/unstow Arm</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_freeze/README.html">Arm Freeze</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_and_mobility_command/README.html">Arm and Mobility Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_with_body_follow/README.html">Arm Command with Body Following</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_constrained_manipulation/README.html">Arm Constrained Manipulation</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_trajectory/README.html">Arm Trajectory</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_trajectory/README.html#long-trajectory">Long Trajectory</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_joint_move/README.html">Arm Joint Move Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_force_control/README.html">Arm Force Control Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_grasp/README.html">Arm Grasp Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_grasp_carry_overrides/README.html">Arm Grasp and Carry Overrides</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_gaze/README.html">Arm Gaze Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_surface_contact/README.html">Arm Command with Surface Contact</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_door/README.html">Arm Door Opening Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_walk_to_object/README.html">Walk to And Pick Up Object</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_gcode/README.html">Writing Gcode</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/gripper_camera_params/README.html">Gripper Camera Parameters</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_impedance_control/README.html">Arm Impedance Control</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/inverse_kinematics/README.html">Inverse Kinematics</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/arm_wasd/README.html">Arm WASD</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/joint_control/README.html">Wiggle Arm</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/examples/docs/payloads_examples.html">Payloads and Registration Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/payloads/README.html">Payloads</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/self_registration/README.html">Self Registration</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/service_faults/README.html">Faults</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/velodyne_client/README.html">Velodyne</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/core_io_gpio/README.html">CORE I/O GPIO</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/metrics_over_coreio/README.html">Overview</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/metrics_over_coreio/README.html#usage">Usage</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/metrics_over_coreio/README.html#components">Components</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/metrics_over_coreio/README.html#recommended-debugging">Recommended debugging</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/extensions/README.html">Extensions</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/examples/docs/perception_world_objects_examples.html">Perception and World Objects Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/get_image/README.html">Get Image</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/get_world_objects/README.html">Get World Objects</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/world_object_with_image_coordinates/README.html">World Object With Image Coordinates</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/world_object_mutations/README.html">World Object Mutations</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/visualizer/README.html">Visualizer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/gripper_camera_params/README.html">Gripper Camera Parameters</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/spot_cam/README.html">Spot CAM Services</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/spot_cam/README.html#spot-cam-video-core-io-extension-example">Spot Cam Video Core IO Extension Example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/stitch_front_images/README.html">Stitch Front Images</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/get_depth_plus_visual_image/README.html">Project Depth Data on Visual Images</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/service_customization/custom_parameter_image_server/README.html">Custom Parameter Image Server</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/fiducial_follow/README.html">Fiducial Follow</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/spot_tensorflow_detector/README.html">Tensorflow Detector</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/service_customization/custom_parameter_ncb_worker/README.html">Custom Parameter Tensorflow Detector</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/network_compute_bridge/README.html">Machine Learning with the Network Compute Bridge</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/network_compute_bridge/fire_extinguisher_server/README.html">Fire Extinguisher Detector with the Network Compute Bridge</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/ray_cast/README.html">Ray Cast</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/user_nogo_regions/README.html">No-Go Regions</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/gps_service/README.html">GPS</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/examples/docs/logging_examples.html">Logging Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/bddf_download/README.html">BDDF Download</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/data_buffer/README.html">Data Buffer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/data_service/README.html">Data Service</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/logging/README.html">Logging</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/log_status/README.html">Log Status</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/examples/docs/data_acquisition_examples.html">Data Acquisition Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/data_acquisition_service/README.html">Data Acquisition Service</a><ul>
<li class="toctree-l5"><a class="reference internal" href="../../../python/examples/data_acquisition_service/signals_coreio_modem_plugin/README.html">Modem Signals</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/service_faults/README.html">Faults</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/service_customization/custom_parameter_image_server/README.html">Custom Parameter Image Service</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/service_customization/custom_parameters_data_acquisition/README.html">Custom Parameter Data Acquisition Plugin</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/get_image/README.html">Test Image Service Implementation with Get Image</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/post_docking_callbacks/README.html">Post Docking Callbacks</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/cloud_upload/README.html">Cloud Upload</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/comms_mapping/README.html">Comms image service</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/comms_mapping/README.html#how-to-use">How to use</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/data_acquisition_service/signals_coreio_modem_plugin/README.html">CoreIO Modem Signals Plugin</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/tester_programs/README.html">Tester Programs</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/examples/docs/autonomy_and_missions_examples.html">Autonomy and Missions Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/graph_nav_anchoring_optimization/README.html">Graph Nav Anchoring Optimization</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/graph_nav_command_line/README.html">GraphNav and Recording Service Command Line Interfaces</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/graph_nav_command_line/README.html#example-programs">Example Programs</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/graph_nav_extract_point_cloud/README.html">Graph Nav Extract Point Cloud</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/graph_nav_view_map/README.html">Graph Nav View Map</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/graph_nav_view_gps/README.html">Graph Nav View GPS Data</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/get_mission_state/README.html">Get Mission State</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/remote_mission_service/README.html">Remote Mission Service</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/mission_question_answerer/README.html">Mission Question Answerer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/mission_recorder/README.html">Mission Recorder</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/replay_mission/README.html">Replay Mission</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/post_docking_callbacks/README.html">Post Docking Callbacks</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/area_callback/README.html">Area Callbacks</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/edit_autowalk/README.html">Edit Autowalk</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/record_autowalk/README.html">Record Autowalk</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/extract_images_from_walk/README.html">Extract Images from Autowalk</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/network_request_callback/README.html">Network Request Callback</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/network_request_callback/README.html#id1">Network Request Callback</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/remote_mission_service/spot_check/README.html">SpotCheck Mission Service</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/examples/docs/joint_control_examples.html">Joint Control API Examples</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/examples/docs/orbit.html">Orbit</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/orbit/hello_orbit/README.html">Hello Orbit</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/orbit/export_run_archives/README.html">Export Run Archives</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/orbit/export_site_walk_archives/README.html">Export Sitewalk Archives</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/orbit/anomalies/README.html">Anomalies</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/orbit/schedule_mission/README.html">Schedule Mission</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/orbit/runs_response/README.html">Runs Response</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/orbit/send_robot_back_to_dock/README.html">Return to Dock</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/orbit/toggle_mission_based_on_weather/README.html">Mission Toggle</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/orbit/webhook/README.html">Webhook</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/orbit/backups/README.html">Backups</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/orbit/webhook_integration/README.html">Webhook Integrations</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/examples/orbit/webhook_integration/README.html#example-overview">Example Overview</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../python/README.html">Python Reference Guide</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/README.html">Client</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/area_callback.html">Area Callback</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/area_callback_region_handler_base.html">Area Callback Region Handler</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/area_callback_service_runner.html">Area Callback Service Runner</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/area_callback_service_servicer.html">Area Callback Servicer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/area_callback_service_utils.html">Area Callback Service Utils</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/arm_surface_contact.html">Arm Surface Contact</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/async_tasks.html">Async Tasks</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/audio_visual.html">Audio Visual</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/audio_visual_helpers.html">Audio Visual Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/auth.html">Auth</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/auto_return.html">Auto Return</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/autowalk.html">Autowalk</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/bddf.html">BDDF</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/bddf_download.html">BDDF Download</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/channel.html">Channel</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/command_line.html">Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/common.html">Common</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/data_acquisition.html">Data Acquisition</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/data_acquisition_helpers.html">Data Acquisition Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/data_acquisition_plugin.html">Data Acquisition Plugin</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/data_acquisition_plugin_service.html">Data Acquisition Plugin Service</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/data_acquisition_store.html">Data Acquisition Store</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/data_buffer.html">Data Buffer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/data_chunk.html">Data Chunk</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/data_service.html">Data Service</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/directory_registration.html">Directory Registration</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/directory.html">Directory</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/docking.html">Docking</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/door.html">Door</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/estop.html">E-Stop</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/error_callback_result.html">Error Callback Result</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/exceptions.html">Exceptions</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/fault.html">Fault</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/frame_helpers.html">Frame Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html">Graph Nav</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/gripper_camera_param.html">Gripper Camera Params</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/gps/README.html">GPS</a><ul>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/gps/aggregator_client.html">Aggregator Client</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/gps/gps_listener.html">GPS Listener</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/gps/NMEAParser.html">NMEA Parser</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/gps/ntrip_client.html">NTRIP Client</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/gps/registration_client.html">Registration Client</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/image.html">Image</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/image_service_helpers.html">Image Service Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/inverse_kinematics.html">Inverse Kinematics</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/ir_enable_disable.html">IR Enable/Disable</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/keepalive.html">Keep Alive</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/lease.html">Lease</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/lease_resource_hierarchy.html">Lease Resource Hierarchy</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/lease_validator.html">Lease Validator</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/license.html">License</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/local_grid.html">Local Grid</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/log_status.html">Log Status</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/math_helpers.html">Math Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/manipulation_api_client.html">Manipulation API</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/map_processing.html">Map Processing</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/metrics_logging.html">Metrics Logging</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/network_compute_bridge_client.html">Network Compute Bridge</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/payload_registration.html">Payload Registration</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/payload_software_update.html">Payload Software Update</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/payload_software_update_initiation.html">Payload Software Update Initiation</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/payload.html">Payload</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/point_cloud.html">Point Cloud</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/power.html">Power</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/processors.html">Processors</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/ray_cast.html">Ray casting</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/recording.html">Recording</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/robot_command.html">Robot Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/robot_id.html">Robot ID</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/robot.html">Robot</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/robot_state.html">Robot State</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/sdk.html">SDK</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/server_util.html">Server Util</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/service_customization_helpers.html">Service Customization Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/signals_helpers.html">Signals Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_cam/README.html">Spot CAM</a><ul>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_cam/audio.html">Audio</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_cam/compositor.html">Compositor</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_cam/health.html">Health</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_cam/lighting.html">Lighting</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_cam/lights_helper.html">Lights Helper</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_cam/media_log.html">Media Log</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_cam/network.html">Network</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_cam/power.html">Power</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_cam/ptz.html">PTZ</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_cam/streamquality.html">Stream Quality</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_cam/version.html">Version</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/spot_check.html">Spot Check</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/time_sync.html">Time Sync</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/token_cache.html">Token Cache</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/token_manager.html">Token Manager</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/units_helpers.html">Units Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/util.html">Util</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-client/src/bosdyn/client/world_object.html">World Object</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/README.html">Core</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/README.html">BDDF</a><ul>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/base_data_reader.html">Base Data Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/block_writer.html">Block Writer</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/bosdyn.html">BDDF Conventions</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/common.html">Common</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/data_reader.html">Data Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/data_writer.html">Data Writer</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/file_indexer.html">File Indexer</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/grpc_proto_reader.html">GRPC Proto Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/grpc_reader.html">GRPC Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/grpc_service_reader.html">GRPC Service Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/grpc_service_writer.html">GRPC Service Writer</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/message_reader.html">Message Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/pod_series_reader.html">POD Series Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/pod_series_writer.html">POD Series Writer</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/protobuf_channel_reader.html">Protobuf Channel Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/protobuf_reader.html">Protobuf Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/protobuf_series_writer.html">Protobuf Series Writer</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/bddf/stream_data_reader.html">Stream Data Reader</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/geometry.html">Geometry</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/util.html">Util</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-core/src/bosdyn/deprecated.html">Deprecated</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/bosdyn-mission/src/bosdyn/mission/README.html">Mission</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-mission/src/bosdyn/mission/client.html">Client</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-mission/src/bosdyn/mission/constants.html">Constants</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-mission/src/bosdyn/mission/exceptions.html">Exceptions</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-mission/src/bosdyn/mission/remote_client.html">Remote Client</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-mission/src/bosdyn/mission/server_util.html">Server Util</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-mission/src/bosdyn/mission/util.html">Util</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/README.html">Choreography</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html">Choreography</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/animation_file_to_proto.html">Animation File to Proto</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/animation_file_conversion_helpers.html">Animation File to Proto Helpers</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/bosdyn-orbit/src/bosdyn/orbit/README.html">Orbit (formerly Scout)</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-orbit/src/bosdyn/orbit/client.html">Client</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-orbit/src/bosdyn/orbit/utils.html">Utils</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-orbit/src/bosdyn/orbit/exceptions.html">Exceptions</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../python/bosdyn-scout/src/bosdyn/scout/README.html">Scout (deprecated)</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-scout/src/bosdyn/scout/client.html">Client</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-scout/src/bosdyn/scout/utils.html">Utils</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../python/bosdyn-scout/src/bosdyn/scout/exceptions.html">Exceptions</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/python/fetch_tutorial/fetch1.html">Fetch Tutorial</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/python/fetch_tutorial/fetch2.html">Part 2: Training the Model</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/python/fetch_tutorial/fetch3.html">Part 3: Evaluating the Model</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/python/fetch_tutorial/fetch4.html">Part 4: Autonomous Pick Up</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/python/fetch_tutorial/fetch5.html">Part 5: Detecting People and Playing Fetch</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/python/fetch_tutorial/fetch6.html">Part 6: Running the model on Core IO</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/python/daq_tutorial/daq1.html">Data Collection Tutorial</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/python/daq_tutorial/daq2.html">Part 2: Capturing images</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/python/daq_tutorial/daq3.html">Part 3: Capturing other data</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/python/daq_tutorial/daq4.html">Part 4: Deploying to the CORE I/O</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/python/daq_tutorial/daq5.html">Part 5: Collecting data</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/python/daq_tutorial/daq6.html">Part 6: Processing collected data</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../docs/payload/README.html">Payloads</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/payload/payload_configuration_requirements.html">Payload configuration requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/payload/mechanical_interfaces.html">Mechanical interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/payload/robot_mounting_rails.html">Robot mounting rails</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/payload/guidelines_for_robust_payload_design.html">Guidelines for robust payload design</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/payload/robot_electrical_interface.html">Robot electrical interface</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/payload/coreio_documentation.html">CORE I/O Documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/payload/coreio_openvpn_extension.html">CORE I/O OpenVPN Extension</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/payload/configuring_payload_software.html">Configuring payload software</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/payload/docker_containers.html">Dockerize payload software</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/payload/spot_core_documentation.html">Pre-3.2 Spot CORE Documentation</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/payload/spot_core_portainer.html">Configuring Docker containers in SpotCORE</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/payload/spot_core_cockpit.html">Spot CORE system management tool: Cockpit</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../docs/payload/spot_core_vnc.html">Spot CORE VNC</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../docs/protos/README.html">API Protocol</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../docs/protos/style_guide.html">Style Guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../protos/bosdyn/api/README.html">Proto Reference Guide</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../protos/bosdyn/api/proto_reference.html">Protos</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../docs/release_notes.html">Release Notes</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/boston-dynamics/spot-sdk">SDK Repository</a></li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../README.html">Spot</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../../README.html" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../../index.html">Module code</a></li>
      <li class="breadcrumb-item active">bosdyn.client.graph_nav</li>
      <li class="wy-breadcrumbs-aside">
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <h1>Source code for bosdyn.client.graph_nav</h1><div class="highlight"><pre>
<span></span><span class="c1"># Copyright (c) 2023 Boston Dynamics, Inc.  All rights reserved.</span>
<span class="c1">#</span>
<span class="c1"># Downloading, reproducing, distributing or otherwise using the SDK Software</span>
<span class="c1"># is subject to the terms and conditions of the Boston Dynamics Software</span>
<span class="c1"># Development Kit License (20191101-BDSDK-SL).</span>

<span class="sd">&quot;&quot;&quot;For clients to the graphnav service.&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">collections</span>
<span class="kn">import</span> <span class="nn">math</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">time</span>

<span class="kn">from</span> <span class="nn">deprecated.sphinx</span> <span class="kn">import</span> <span class="n">deprecated</span>

<span class="kn">from</span> <span class="nn">bosdyn.api</span> <span class="kn">import</span> <span class="n">data_chunk_pb2</span><span class="p">,</span> <span class="n">lease_pb2</span>
<span class="kn">from</span> <span class="nn">bosdyn.api.graph_nav</span> <span class="kn">import</span> <span class="p">(</span><span class="n">graph_nav_pb2</span><span class="p">,</span> <span class="n">graph_nav_service_pb2</span><span class="p">,</span> <span class="n">graph_nav_service_pb2_grpc</span><span class="p">,</span>
                                  <span class="n">map_pb2</span><span class="p">,</span> <span class="n">nav_pb2</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">bosdyn.client.common</span> <span class="kn">import</span> <span class="p">(</span><span class="n">BaseClient</span><span class="p">,</span> <span class="n">common_header_errors</span><span class="p">,</span> <span class="n">common_lease_errors</span><span class="p">,</span>
                                  <span class="n">error_factory</span><span class="p">,</span> <span class="n">error_pair</span><span class="p">,</span> <span class="n">handle_common_header_errors</span><span class="p">,</span>
                                  <span class="n">handle_lease_use_result_errors</span><span class="p">,</span> <span class="n">handle_license_errors_if_present</span><span class="p">,</span>
                                  <span class="n">handle_unset_status_error</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">bosdyn.client.exceptions</span> <span class="kn">import</span> <span class="n">Error</span><span class="p">,</span> <span class="n">InvalidRequestError</span><span class="p">,</span> <span class="n">ResponseError</span><span class="p">,</span> <span class="n">UnimplementedError</span>
<span class="kn">from</span> <span class="nn">bosdyn.client.lease</span> <span class="kn">import</span> <span class="n">add_lease_wallet_processors</span>


<div class="viewcode-block" id="GraphNavClient"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient">[docs]</a><span class="k">class</span> <span class="nc">GraphNavClient</span><span class="p">(</span><span class="n">BaseClient</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Client to the GraphNav service.&quot;&quot;&quot;</span>
    <span class="n">default_service_name</span> <span class="o">=</span> <span class="s1">&#39;graph-nav-service&#39;</span>
    <span class="n">service_type</span> <span class="o">=</span> <span class="s1">&#39;bosdyn.api.graph_nav.GraphNavService&#39;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">(</span><span class="n">GraphNavClient</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">graph_nav_service_pb2_grpc</span><span class="o">.</span><span class="n">GraphNavServiceStub</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span> <span class="o">=</span> <span class="kc">None</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_data_chunk_size</span> <span class="o">=</span> <span class="mi">1024</span> <span class="o">*</span> <span class="mi">1024</span>  <span class="c1"># bytes = 1 MB</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_use_streaming_graph_upload</span> <span class="o">=</span> <span class="kc">True</span>

<div class="viewcode-block" id="GraphNavClient.update_from"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.update_from">[docs]</a>    <span class="k">def</span> <span class="nf">update_from</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">(</span><span class="n">GraphNavClient</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">update_from</span><span class="p">(</span><span class="n">other</span><span class="p">)</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">lease_wallet</span><span class="p">:</span>
            <span class="n">add_lease_wallet_processors</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">lease_wallet</span><span class="p">)</span>

        <span class="c1"># Grab a timesync endpoint if it is available.</span>
        <span class="k">try</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span> <span class="o">=</span> <span class="n">other</span><span class="o">.</span><span class="n">time_sync</span><span class="o">.</span><span class="n">endpoint</span>
        <span class="k">except</span> <span class="ne">AttributeError</span><span class="p">:</span>
            <span class="k">pass</span>  <span class="c1"># other doesn&#39;t have a time_sync accessor</span></div>

<div class="viewcode-block" id="GraphNavClient.set_localization_full_response"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.set_localization_full_response">[docs]</a>    <span class="k">def</span> <span class="nf">set_localization_full_response</span><span class="p">(</span>
            <span class="bp">self</span><span class="p">,</span> <span class="n">initial_guess_localization</span><span class="p">,</span> <span class="n">ko_tform_body</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">max_distance</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">max_yaw</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">fiducial_init</span><span class="o">=</span><span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationRequest</span><span class="o">.</span><span class="n">FIDUCIAL_INIT_NEAREST</span><span class="p">,</span>
            <span class="n">use_fiducial_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">refine_fiducial_result_with_icp</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">do_ambiguity_check</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">refine_with_visual_features</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">verify_visual_features_quality</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Version of set_localization which returns the full response,</span>
<span class="sd">        rather than only the Localization message.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_set_localization_request</span><span class="p">(</span>
            <span class="n">initial_guess_localization</span><span class="p">,</span> <span class="n">ko_tform_body</span><span class="p">,</span> <span class="n">max_distance</span><span class="p">,</span> <span class="n">max_yaw</span><span class="p">,</span> <span class="n">fiducial_init</span><span class="p">,</span>
            <span class="n">use_fiducial_id</span><span class="p">,</span> <span class="n">refine_fiducial_result_with_icp</span><span class="p">,</span> <span class="n">do_ambiguity_check</span><span class="p">,</span>
            <span class="n">refine_with_visual_features</span><span class="p">,</span> <span class="n">verify_visual_features_quality</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">SetLocalization</span><span class="p">,</span> <span class="n">req</span><span class="p">,</span> <span class="n">_get_response</span><span class="p">,</span> <span class="n">_set_localization_error</span><span class="p">,</span>
                         <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.set_localization_async_full_response"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.set_localization_async_full_response">[docs]</a>    <span class="k">def</span> <span class="nf">set_localization_async_full_response</span><span class="p">(</span>
            <span class="bp">self</span><span class="p">,</span> <span class="n">initial_guess_localization</span><span class="p">,</span> <span class="n">ko_tform_body</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">max_distance</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">max_yaw</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">fiducial_init</span><span class="o">=</span><span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationRequest</span><span class="o">.</span><span class="n">FIDUCIAL_INIT_NEAREST</span><span class="p">,</span>
            <span class="n">use_fiducial_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">refine_fiducial_result_with_icp</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">do_ambiguity_check</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">refine_with_visual_features</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">verify_visual_features_quality</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of set_localization_full_response()&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_set_localization_request</span><span class="p">(</span>
            <span class="n">initial_guess_localization</span><span class="p">,</span> <span class="n">ko_tform_body</span><span class="p">,</span> <span class="n">max_distance</span><span class="p">,</span> <span class="n">max_yaw</span><span class="p">,</span> <span class="n">fiducial_init</span><span class="p">,</span>
            <span class="n">use_fiducial_id</span><span class="p">,</span> <span class="n">refine_fiducial_result_with_icp</span><span class="p">,</span> <span class="n">do_ambiguity_check</span><span class="p">,</span>
            <span class="n">refine_with_visual_features</span><span class="p">,</span> <span class="n">verify_visual_features_quality</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">SetLocalization</span><span class="p">,</span> <span class="n">req</span><span class="p">,</span> <span class="n">_get_response</span><span class="p">,</span>
                               <span class="n">_set_localization_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.set_localization"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.set_localization">[docs]</a>    <span class="k">def</span> <span class="nf">set_localization</span><span class="p">(</span>
            <span class="bp">self</span><span class="p">,</span> <span class="n">initial_guess_localization</span><span class="p">,</span> <span class="n">ko_tform_body</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">max_distance</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">max_yaw</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">fiducial_init</span><span class="o">=</span><span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationRequest</span><span class="o">.</span><span class="n">FIDUCIAL_INIT_NEAREST</span><span class="p">,</span>
            <span class="n">use_fiducial_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">refine_fiducial_result_with_icp</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">do_ambiguity_check</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">refine_with_visual_features</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">verify_visual_features_quality</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Trigger a manual localization. Typically done to provide the initial localization.</span>

<span class="sd">        Args:</span>
<span class="sd">            initial_guess_localization (nav_pb2.Localization): Operator-supplied guess at localization.</span>
<span class="sd">            ko_tform_body: Robot SE3Pose protobuf when the initial_guess was made.</span>
<span class="sd">            max_distance: [optional] Margin of distance (meters) away from the initial guess.</span>
<span class="sd">            max_yaw: [optional] Margin of angle (radians) away from the initial guess.</span>
<span class="sd">            fiducial_init: Tells the initializer whether to use fiducials, and how to use them.</span>
<span class="sd">            use_fiducial_id: If using FIDUCIAL_INIT_SPECIFIC, this is the specific fiducial ID to use for initialization.</span>
<span class="sd">            refine_fiducial_result_with_icp: Boolean determining if ICP will run after a fiducial is used for an initial guess.</span>
<span class="sd">            do_ambiguity_check: Boolean where if true, consider how nearby localizations appear.</span>
<span class="sd">            refine_with_visual_features: Boolean determining if visual features should be used to refine the estimate. When set,</span>
<span class="sd">            this value overrides refine_fiducial_result_with_icp.</span>
<span class="sd">            verify_visual_features_quality: When refine_with_visual_features is set, determines if an error is asserted when the</span>
<span class="sd">            refinement is unsuccessful.</span>
<span class="sd">        Returns:</span>
<span class="sd">            The resulting localization after being triggered with a guess.</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot</span>
<span class="sd">            RobotFaultedError: Robot is experiencing a fault condition that prevents localization.</span>
<span class="sd">            UnknownMapInformationError: Specified waypoint is unknown.</span>
<span class="sd">            bosdyn.client.exceptions.InvalidRequestError: The data provided is incomplete or invalid</span>
<span class="sd">            GraphNavServiceResponseError: Localization was aborted or failed.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_set_localization_request</span><span class="p">(</span>
            <span class="n">initial_guess_localization</span><span class="p">,</span> <span class="n">ko_tform_body</span><span class="p">,</span> <span class="n">max_distance</span><span class="p">,</span> <span class="n">max_yaw</span><span class="p">,</span> <span class="n">fiducial_init</span><span class="p">,</span>
            <span class="n">use_fiducial_id</span><span class="p">,</span> <span class="n">refine_fiducial_result_with_icp</span><span class="p">,</span> <span class="n">do_ambiguity_check</span><span class="p">,</span>
            <span class="n">refine_with_visual_features</span><span class="p">,</span> <span class="n">verify_visual_features_quality</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">SetLocalization</span><span class="p">,</span> <span class="n">req</span><span class="p">,</span> <span class="n">_localization_from_response</span><span class="p">,</span>
                         <span class="n">_set_localization_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.set_localization_async"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.set_localization_async">[docs]</a>    <span class="k">def</span> <span class="nf">set_localization_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="p">,</span> <span class="n">initial_guess_localization</span><span class="p">,</span> <span class="n">ko_tform_body</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">max_distance</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">max_yaw</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">fiducial_init</span><span class="o">=</span><span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationRequest</span><span class="o">.</span><span class="n">FIDUCIAL_INIT_NEAREST</span><span class="p">,</span>
            <span class="n">use_fiducial_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">refine_fiducial_result_with_icp</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">do_ambiguity_check</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">refine_with_visual_features</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">verify_visual_features_quality</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of set_localization()&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_set_localization_request</span><span class="p">(</span>
            <span class="n">initial_guess_localization</span><span class="p">,</span> <span class="n">ko_tform_body</span><span class="p">,</span> <span class="n">max_distance</span><span class="p">,</span> <span class="n">max_yaw</span><span class="p">,</span> <span class="n">fiducial_init</span><span class="p">,</span>
            <span class="n">use_fiducial_id</span><span class="p">,</span> <span class="n">refine_fiducial_result_with_icp</span><span class="p">,</span> <span class="n">do_ambiguity_check</span><span class="p">,</span>
            <span class="n">refine_with_visual_features</span><span class="p">,</span> <span class="n">verify_visual_features_quality</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">SetLocalization</span><span class="p">,</span> <span class="n">req</span><span class="p">,</span> <span class="n">_localization_from_response</span><span class="p">,</span>
                               <span class="n">_set_localization_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.get_localization_state"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.get_localization_state">[docs]</a>    <span class="k">def</span> <span class="nf">get_localization_state</span><span class="p">(</span>
            <span class="bp">self</span><span class="p">,</span>
            <span class="n">request_live_point_cloud</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">request_live_images</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">request_live_terrain_maps</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">request_live_world_objects</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">request_live_robot_state</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">waypoint_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">request_gps_state</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Obtain current localization state of the robot.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The current localization protobuf for the robot.</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_get_localization_state_request</span><span class="p">(</span>
            <span class="n">request_live_point_cloud</span><span class="o">=</span><span class="n">request_live_point_cloud</span><span class="p">,</span>
            <span class="n">request_live_images</span><span class="o">=</span><span class="n">request_live_images</span><span class="p">,</span>
            <span class="n">request_live_terrain_maps</span><span class="o">=</span><span class="n">request_live_terrain_maps</span><span class="p">,</span>
            <span class="n">request_live_world_objects</span><span class="o">=</span><span class="n">request_live_world_objects</span><span class="p">,</span>
            <span class="n">request_live_robot_state</span><span class="o">=</span><span class="n">request_live_robot_state</span><span class="p">,</span> <span class="n">waypoint_id</span><span class="o">=</span><span class="n">waypoint_id</span><span class="p">,</span>
            <span class="n">request_gps_state</span><span class="o">=</span><span class="n">request_gps_state</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">GetLocalizationState</span><span class="p">,</span> <span class="n">req</span><span class="p">,</span> <span class="kc">None</span><span class="p">,</span> <span class="n">common_header_errors</span><span class="p">,</span>
                         <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.get_localization_state_async"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.get_localization_state_async">[docs]</a>    <span class="k">def</span> <span class="nf">get_localization_state_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="p">,</span> <span class="n">request_live_point_cloud</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">request_live_images</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">request_live_terrain_maps</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">request_live_world_objects</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">request_live_robot_state</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">waypoint_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">request_gps_state</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of get_localization_state().&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_get_localization_state_request</span><span class="p">(</span>
            <span class="n">request_live_point_cloud</span><span class="o">=</span><span class="n">request_live_point_cloud</span><span class="p">,</span>
            <span class="n">request_live_images</span><span class="o">=</span><span class="n">request_live_images</span><span class="p">,</span>
            <span class="n">request_live_terrain_maps</span><span class="o">=</span><span class="n">request_live_terrain_maps</span><span class="p">,</span>
            <span class="n">request_live_world_objects</span><span class="o">=</span><span class="n">request_live_world_objects</span><span class="p">,</span>
            <span class="n">request_live_robot_state</span><span class="o">=</span><span class="n">request_live_robot_state</span><span class="p">,</span> <span class="n">waypoint_id</span><span class="o">=</span><span class="n">waypoint_id</span><span class="p">,</span>
            <span class="n">request_gps_state</span><span class="o">=</span><span class="n">request_gps_state</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">GetLocalizationState</span><span class="p">,</span> <span class="n">req</span><span class="p">,</span> <span class="kc">None</span><span class="p">,</span> <span class="n">common_header_errors</span><span class="p">,</span>
                               <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigate_route"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigate_route">[docs]</a>    <span class="k">def</span> <span class="nf">navigate_route</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">route</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">route_follow_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">travel_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                       <span class="n">leases</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">command_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                       <span class="n">destination_waypoint_tform_body_goal</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Navigate the given route.</span>

<span class="sd">        Args:</span>
<span class="sd">            route: Route protobuf of the route to follow.</span>
<span class="sd">            route_follow_params: What should the robot do if it is not at the expected point in the</span>
<span class="sd">            route, or the route is blocked.</span>
<span class="sd">            travel_params: API TravelParams for the route.</span>
<span class="sd">            cmd_duration: Number of seconds the command can run for.</span>
<span class="sd">            leases: Leases to show ownership of necessary resources. Will use the client&#39;s leases by default.</span>
<span class="sd">            timesync_endpoint: Use this endpoint for timesync fields. Will use the client&#39;s endpoint by default.</span>
<span class="sd">            command_id: If not None, this continues an existing navigate_route command with the given ID. If None,</span>
<span class="sd">            a new command_id will be used.</span>
<span class="sd">            destination_waypoint_tform_body_goal: SE2Pose protobuf of an offset relative to the destination waypoint.</span>
<span class="sd">            kwargs: Passed to underlying RPC. Example: timeout=5 to cancel the RPC after 5 seconds.</span>
<span class="sd">        Returns:</span>
<span class="sd">            Command ID to use in feedback lookup.</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot.</span>
<span class="sd">            LeaseUseError: Error using provided leases.</span>
<span class="sd">            graph_nav.NoTimeSyncError: Missing clock identifier.</span>
<span class="sd">            graph_nav.CommandExpiredError: Command already expired.</span>
<span class="sd">            graph_nav.TooDistantError: Time too far in the future.</span>
<span class="sd">            graph_nav.RobotImpairedError: Robot cannot travel a route.</span>
<span class="sd">            graph_nav.IsRecordingError: Robot cannot navigate while recording.</span>
<span class="sd">            graph_nav.UnknownRouteElementsError: Unknown edges or waypoints</span>
<span class="sd">            graph_nav.InvalidEdgeError: Mismatch between edges and waypoints.</span>
<span class="sd">            graph_nav.NoPathError: No path to the specified route.</span>
<span class="sd">            graph_nav.RobotNotLocalizedToRouteError: The robot is localized somewhere else.</span>
<span class="sd">            graph_nav.ConstraintFaultError: The route involves invalid constraints.</span>
<span class="sd">            graph_nav.RouteNavigationError: A subclass detailing trouble navigating the route.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">used_endpoint</span> <span class="o">=</span> <span class="n">timesync_endpoint</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">used_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">GraphNavServiceResponseError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">error_message</span><span class="o">=</span><span class="s1">&#39;No timesync endpoint!&#39;</span><span class="p">)</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_route_request</span><span class="p">(</span><span class="n">route</span><span class="p">,</span> <span class="n">route_follow_params</span><span class="p">,</span> <span class="n">travel_params</span><span class="p">,</span>
                                                     <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">leases</span><span class="p">,</span> <span class="n">used_endpoint</span><span class="p">,</span>
                                                     <span class="n">command_id</span><span class="p">,</span>
                                                     <span class="n">destination_waypoint_tform_body_goal</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigateRoute</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                         <span class="n">_command_id_from_navigate_route_response</span><span class="p">,</span> <span class="n">_navigate_route_error</span><span class="p">,</span>
                         <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigate_route_async"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigate_route_async">[docs]</a>    <span class="k">def</span> <span class="nf">navigate_route_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">route</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">route_follow_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                             <span class="n">travel_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">leases</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                             <span class="n">command_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">destination_waypoint_tform_body_goal</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of navigate_route()&quot;&quot;&quot;</span>
        <span class="n">used_endpoint</span> <span class="o">=</span> <span class="n">timesync_endpoint</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">used_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">GraphNavServiceResponseError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">error_message</span><span class="o">=</span><span class="s1">&#39;No timesync endpoint!&#39;</span><span class="p">)</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_route_request</span><span class="p">(</span><span class="n">route</span><span class="p">,</span> <span class="n">route_follow_params</span><span class="p">,</span> <span class="n">travel_params</span><span class="p">,</span>
                                                     <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">leases</span><span class="p">,</span> <span class="n">used_endpoint</span><span class="p">,</span>
                                                     <span class="n">command_id</span><span class="p">,</span>
                                                     <span class="n">destination_waypoint_tform_body_goal</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigateRoute</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                               <span class="n">_command_id_from_navigate_route_response</span><span class="p">,</span> <span class="n">_navigate_route_error</span><span class="p">,</span>
                               <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigate_route_full"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigate_route_full">[docs]</a>    <span class="k">def</span> <span class="nf">navigate_route_full</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">route</span><span class="p">,</span> <span class="n">route_follow_params</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">travel_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                            <span class="n">leases</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">command_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                            <span class="n">destination_waypoint_tform_body_goal</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Identical to navigate_route(), except will return the full NavigateRouteResponse.&quot;&quot;&quot;</span>
        <span class="n">used_endpoint</span> <span class="o">=</span> <span class="n">timesync_endpoint</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">used_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">GraphNavServiceResponseError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">error_message</span><span class="o">=</span><span class="s1">&#39;No timesync endpoint!&#39;</span><span class="p">)</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_route_request</span><span class="p">(</span><span class="n">route</span><span class="p">,</span> <span class="n">route_follow_params</span><span class="p">,</span> <span class="n">travel_params</span><span class="p">,</span>
                                                     <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">leases</span><span class="p">,</span> <span class="n">used_endpoint</span><span class="p">,</span>
                                                     <span class="n">command_id</span><span class="p">,</span>
                                                     <span class="n">destination_waypoint_tform_body_goal</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigateRoute</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">_navigate_route_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigate_route_full_async"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigate_route_full_async">[docs]</a>    <span class="k">def</span> <span class="nf">navigate_route_full_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="p">,</span>
            <span class="n">route</span><span class="p">,</span>
            <span class="n">cmd_duration</span><span class="p">,</span>
            <span class="n">route_follow_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">travel_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">leases</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">timesync_endpoint</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">command_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">destination_waypoint_tform_body_goal</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of navigate_route_full().&quot;&quot;&quot;</span>
        <span class="n">used_endpoint</span> <span class="o">=</span> <span class="n">timesync_endpoint</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">used_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">GraphNavServiceResponseError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">error_message</span><span class="o">=</span><span class="s1">&#39;No timesync endpoint!&#39;</span><span class="p">)</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_route_request</span><span class="p">(</span>
            <span class="n">route</span><span class="p">,</span>
            <span class="n">route_follow_params</span><span class="p">,</span>
            <span class="n">travel_params</span><span class="p">,</span>
            <span class="n">cmd_duration</span><span class="p">,</span>
            <span class="n">leases</span><span class="p">,</span>
            <span class="n">used_endpoint</span><span class="p">,</span>
            <span class="n">command_id</span><span class="p">,</span>
            <span class="n">destination_waypoint_tform_body_goal</span><span class="p">,</span>
        <span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigateRoute</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">_navigate_route_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
                               <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigate_to"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigate_to">[docs]</a>    <span class="k">def</span> <span class="nf">navigate_to</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">destination_waypoint_id</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">route_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                    <span class="n">travel_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">leases</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">command_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                    <span class="n">destination_waypoint_tform_body_goal</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">route_blocked_behavior</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                    <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Navigate to a specific waypoint along a route chosen by the GraphNav service.</span>

<span class="sd">        Args:</span>
<span class="sd">            destination_waypoint_id: Waypoint id string for where to go to.</span>
<span class="sd">            cmd_duration: Number of seconds the command can run for.</span>
<span class="sd">            route_params: API RouteGenParams for the route.</span>
<span class="sd">            travel_params: API TravelParams for the route.</span>
<span class="sd">            leases: Leases to show ownership of necessary resources. Will use the client&#39;s leases by default.</span>
<span class="sd">            timesync_endpoint: Use this endpoint for timesync fields. Will use the client&#39;s endpoint by default.</span>
<span class="sd">            command_id: If not None, this continues an existing navigate_to command with the given ID. If None,</span>
<span class="sd">            a new command_id will be used.</span>
<span class="sd">            destination_waypoint_tform_body_goal: SE2Pose protobuf of an offset relative to the destination waypoint.</span>
<span class="sd">            route_blocked_behavior: Defines robot behavior when route is block. If None robot will reroute.</span>
<span class="sd">        Returns:</span>
<span class="sd">            int: Command ID to use in feedback lookup.</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot.</span>
<span class="sd">            LeaseUseError: Error using provided leases.</span>
<span class="sd">            graph_nav.NoTimeSyncError: Missing clock identifier.</span>
<span class="sd">            graph_nav.CommandExpiredError: Command already expired.</span>
<span class="sd">            graph_nav.TooDistantError: Time too far in the future.</span>
<span class="sd">            graph_nav.RobotImpairedError: Robot cannot travel a route.</span>
<span class="sd">            graph_nav.IsRecordingError: Robot cannot navigate while recording.</span>
<span class="sd">            graph_nav.UnknownWaypointError: Destination waypoint is unknown.</span>
<span class="sd">            graph_nav.NoPathError: No route to destination.</span>
<span class="sd">            graph_nav.RobotNotLocalizedToRouteError: The robot not correctly localized.</span>
<span class="sd">            graph_nav.RouteNavigationError: A subclass detailing trouble navigating the route.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">used_endpoint</span> <span class="o">=</span> <span class="n">timesync_endpoint</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">used_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">GraphNavServiceResponseError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">error_message</span><span class="o">=</span><span class="s1">&#39;No timesync endpoint!&#39;</span><span class="p">)</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_to_request</span><span class="p">(</span><span class="n">destination_waypoint_id</span><span class="p">,</span> <span class="n">travel_params</span><span class="p">,</span>
                                                  <span class="n">route_params</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">leases</span><span class="p">,</span> <span class="n">used_endpoint</span><span class="p">,</span>
                                                  <span class="n">command_id</span><span class="p">,</span> <span class="n">destination_waypoint_tform_body_goal</span><span class="p">,</span>
                                                  <span class="n">route_blocked_behavior</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigateTo</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                         <span class="n">value_from_response</span><span class="o">=</span><span class="n">_command_id_from_navigate_route_response</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">_navigate_to_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigate_to_async"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigate_to_async">[docs]</a>    <span class="k">def</span> <span class="nf">navigate_to_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">destination_waypoint_id</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">route_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                          <span class="n">travel_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">leases</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">command_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                          <span class="n">destination_waypoint_tform_body_goal</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">route_blocked_behavior</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                          <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of navigate_to().&quot;&quot;&quot;</span>
        <span class="n">used_endpoint</span> <span class="o">=</span> <span class="n">timesync_endpoint</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">used_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">GraphNavServiceResponseError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">error_message</span><span class="o">=</span><span class="s1">&#39;No timesync endpoint!&#39;</span><span class="p">)</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_to_request</span><span class="p">(</span><span class="n">destination_waypoint_id</span><span class="p">,</span> <span class="n">travel_params</span><span class="p">,</span>
                                                  <span class="n">route_params</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">leases</span><span class="p">,</span> <span class="n">used_endpoint</span><span class="p">,</span>
                                                  <span class="n">command_id</span><span class="p">,</span> <span class="n">destination_waypoint_tform_body_goal</span><span class="p">,</span>
                                                  <span class="n">route_blocked_behavior</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigateTo</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                               <span class="n">value_from_response</span><span class="o">=</span><span class="n">_command_id_from_navigate_route_response</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">_navigate_to_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigate_to_full"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigate_to_full">[docs]</a>    <span class="k">def</span> <span class="nf">navigate_to_full</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">destination_waypoint_id</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">route_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                         <span class="n">travel_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">leases</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">command_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                         <span class="n">destination_waypoint_tform_body_goal</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">route_blocked_behavior</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                         <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Identical to navigate_to(), except will return the full NavigateToResponse.&quot;&quot;&quot;</span>
        <span class="n">used_endpoint</span> <span class="o">=</span> <span class="n">timesync_endpoint</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">used_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">GraphNavServiceResponseError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">error_message</span><span class="o">=</span><span class="s1">&#39;No timesync endpoint!&#39;</span><span class="p">)</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_to_request</span><span class="p">(</span><span class="n">destination_waypoint_id</span><span class="p">,</span> <span class="n">travel_params</span><span class="p">,</span>
                                                  <span class="n">route_params</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">leases</span><span class="p">,</span> <span class="n">used_endpoint</span><span class="p">,</span>
                                                  <span class="n">command_id</span><span class="p">,</span> <span class="n">destination_waypoint_tform_body_goal</span><span class="p">,</span>
                                                  <span class="n">route_blocked_behavior</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigateTo</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">error_from_response</span><span class="o">=</span><span class="n">_navigate_to_error</span><span class="p">,</span>
                         <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigate_to_full_async"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigate_to_full_async">[docs]</a>    <span class="k">def</span> <span class="nf">navigate_to_full_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">destination_waypoint_id</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">route_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                               <span class="n">travel_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">leases</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                               <span class="n">command_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">destination_waypoint_tform_body_goal</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                               <span class="n">route_blocked_behavior</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of navigate_to_full().&quot;&quot;&quot;</span>
        <span class="n">used_endpoint</span> <span class="o">=</span> <span class="n">timesync_endpoint</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">used_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">GraphNavServiceResponseError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">error_message</span><span class="o">=</span><span class="s1">&#39;No timesync endpoint!&#39;</span><span class="p">)</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_to_request</span><span class="p">(</span><span class="n">destination_waypoint_id</span><span class="p">,</span> <span class="n">travel_params</span><span class="p">,</span>
                                                  <span class="n">route_params</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">leases</span><span class="p">,</span> <span class="n">used_endpoint</span><span class="p">,</span>
                                                  <span class="n">command_id</span><span class="p">,</span> <span class="n">destination_waypoint_tform_body_goal</span><span class="p">,</span>
                                                  <span class="n">route_blocked_behavior</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigateTo</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">_navigate_to_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigate_to_anchor"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigate_to_anchor">[docs]</a>    <span class="k">def</span> <span class="nf">navigate_to_anchor</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seed_tform_goal</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">route_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                           <span class="n">travel_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">leases</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                           <span class="n">goal_waypoint_rt_seed_ewrt_seed_tolerance</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">command_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                           <span class="n">gps_navigation_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Navigate to a pose in seed frame along a route chosen by the GraphNav service.</span>

<span class="sd">        Args:</span>
<span class="sd">            seed_tform_goal: SE3Pose protobuf of the goal pose in seed frame.</span>
<span class="sd">            cmd_duration: Number of seconds the command can run for.</span>
<span class="sd">            route_params: API RouteGenParams for the route.</span>
<span class="sd">            travel_params: API TravelParams for the route.</span>
<span class="sd">            leases: Leases to show ownership of necessary resources. Will use the client&#39;s leases by default.</span>
<span class="sd">            timesync_endpoint: Use this endpoint for timesync fields. Will use the client&#39;s endpoint by default.</span>
<span class="sd">            goal_waypoint_rt_seed_ewrt_seed_tolerance: Vec3 protobuf of the tolerances for goal waypoint selection.</span>
<span class="sd">            command_id: If not None, this continues an existing navigate_to command with the given ID. If None,</span>
<span class="sd">            a new command_id will be used.</span>
<span class="sd">            gps_navigation_params: API GPSNavigationParams. If not None, this will be interpreted as a GPS-based</span>
<span class="sd">            navigation command. seed_tform_goal will be ignored and whatever goal is passed in using the GPS</span>
<span class="sd">            navigation params will be used.</span>
<span class="sd">        Returns:</span>
<span class="sd">            int: Command ID to use in feedback lookup.</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot.</span>
<span class="sd">            LeaseUseError: Error using provided leases.</span>
<span class="sd">            graph_nav.NoTimeSyncError: Missing clock identifier.</span>
<span class="sd">            graph_nav.CommandExpiredError: Command already expired.</span>
<span class="sd">            graph_nav.TooDistantError: Time too far in the future.</span>
<span class="sd">            graph_nav.RobotImpairedError: Robot cannot travel a route.</span>
<span class="sd">            graph_nav.IsRecordingError: Robot cannot navigate while recording.</span>
<span class="sd">            graph_nav.NoAnchoringError: There is no anchoring.</span>
<span class="sd">            graph_nav.NoPathError: No route to goal waypoint, or no goal waypoint found.</span>
<span class="sd">            graph_nav.InvalidPoseError: The requested pose is invalid, or known to be unachievable.</span>
<span class="sd">            graph_nav.RobotNotLocalizedToRouteError: The robot not correctly localized.</span>
<span class="sd">            graph_nav.RouteNavigationError: A subclass detailing trouble navigating the route.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">used_endpoint</span> <span class="o">=</span> <span class="n">timesync_endpoint</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">used_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">GraphNavServiceResponseError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">error_message</span><span class="o">=</span><span class="s1">&#39;No timesync endpoint!&#39;</span><span class="p">)</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_to_anchor_request</span><span class="p">(</span>
            <span class="n">seed_tform_goal</span><span class="p">,</span> <span class="n">travel_params</span><span class="p">,</span> <span class="n">route_params</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">leases</span><span class="p">,</span> <span class="n">used_endpoint</span><span class="p">,</span>
            <span class="n">command_id</span><span class="p">,</span> <span class="n">goal_waypoint_rt_seed_ewrt_seed_tolerance</span><span class="p">,</span> <span class="n">gps_navigation_params</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigateToAnchor</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                         <span class="n">value_from_response</span><span class="o">=</span><span class="n">_command_id_from_navigate_route_response</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">_navigate_to_anchor_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
                         <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigate_to_anchor_async"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigate_to_anchor_async">[docs]</a>    <span class="k">def</span> <span class="nf">navigate_to_anchor_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seed_tform_goal</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">route_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                                 <span class="n">travel_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">leases</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                                 <span class="n">goal_waypoint_rt_seed_ewrt_seed_tolerance</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">command_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                                 <span class="n">gps_navigation_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of navigate_to_anchor().&quot;&quot;&quot;</span>
        <span class="n">used_endpoint</span> <span class="o">=</span> <span class="n">timesync_endpoint</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">used_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">GraphNavServiceResponseError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">error_message</span><span class="o">=</span><span class="s1">&#39;No timesync endpoint!&#39;</span><span class="p">)</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_to_anchor_request</span><span class="p">(</span>
            <span class="n">seed_tform_goal</span><span class="p">,</span> <span class="n">travel_params</span><span class="p">,</span> <span class="n">route_params</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">leases</span><span class="p">,</span> <span class="n">used_endpoint</span><span class="p">,</span>
            <span class="n">command_id</span><span class="p">,</span> <span class="n">goal_waypoint_rt_seed_ewrt_seed_tolerance</span><span class="p">,</span> <span class="n">gps_navigation_params</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigateToAnchor</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                               <span class="n">value_from_response</span><span class="o">=</span><span class="n">_command_id_from_navigate_route_response</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">_navigate_to_anchor_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
                               <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigate_to_anchor_full_async"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigate_to_anchor_full_async">[docs]</a>    <span class="k">def</span> <span class="nf">navigate_to_anchor_full_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seed_tform_goal</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">route_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                                      <span class="n">travel_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">leases</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                                      <span class="n">goal_waypoint_rt_seed_ewrt_seed_tolerance</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                                      <span class="n">command_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">gps_navigation_params</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of navigate_to_anchor() that returns the full response.&quot;&quot;&quot;</span>
        <span class="n">used_endpoint</span> <span class="o">=</span> <span class="n">timesync_endpoint</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">used_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">GraphNavServiceResponseError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">error_message</span><span class="o">=</span><span class="s1">&#39;No timesync endpoint!&#39;</span><span class="p">)</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_to_anchor_request</span><span class="p">(</span>
            <span class="n">seed_tform_goal</span><span class="p">,</span> <span class="n">travel_params</span><span class="p">,</span> <span class="n">route_params</span><span class="p">,</span> <span class="n">cmd_duration</span><span class="p">,</span> <span class="n">leases</span><span class="p">,</span> <span class="n">used_endpoint</span><span class="p">,</span>
            <span class="n">command_id</span><span class="p">,</span> <span class="n">goal_waypoint_rt_seed_ewrt_seed_tolerance</span><span class="p">,</span> <span class="n">gps_navigation_params</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigateToAnchor</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">_navigate_to_anchor_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
                               <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigation_feedback"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigation_feedback">[docs]</a>    <span class="k">def</span> <span class="nf">navigation_feedback</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">command_id</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Returns the feedback corresponding to the active route follow command.</span>

<span class="sd">        Args:</span>
<span class="sd">            command_id (int):  If blank, will return current command status.  If filled</span>
<span class="sd">                out, will attempt to return that command status</span>
<span class="sd">        Returns:</span>
<span class="sd">            NavigationFeedbackResponse</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_feedback_request</span><span class="p">(</span><span class="n">command_id</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigationFeedback</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="n">_get_response</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">_navigate_feedback_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.navigation_feedback_async"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.navigation_feedback_async">[docs]</a>    <span class="k">def</span> <span class="nf">navigation_feedback_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">command_id</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of navigation_feedback().&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_navigate_feedback_request</span><span class="p">(</span><span class="n">command_id</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">NavigationFeedback</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                               <span class="n">value_from_response</span><span class="o">=</span><span class="n">_get_response</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">_navigate_feedback_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
                               <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.clear_graph"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.clear_graph">[docs]</a>    <span class="k">def</span> <span class="nf">clear_graph</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">lease</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Clears the local graph structure. Also erases any snapshots currently in RAM.</span>

<span class="sd">        Args:</span>
<span class="sd">            lease: Leases to show ownership of necessary resources. Will use the client&#39;s leases by default.</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot.</span>
<span class="sd">            LeaseUseError: Error using provided lease.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_clear_graph_request</span><span class="p">(</span><span class="n">lease</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ClearGraph</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">_clear_graph_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.clear_graph_async"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.clear_graph_async">[docs]</a>    <span class="k">def</span> <span class="nf">clear_graph_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">lease</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of clear_graph().&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_clear_graph_request</span><span class="p">(</span><span class="n">lease</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ClearGraph</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">handle_common_header_errors</span><span class="p">(</span><span class="n">common_lease_errors</span><span class="p">),</span>
                               <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.upload_graph"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.upload_graph">[docs]</a>    <span class="k">def</span> <span class="nf">upload_graph</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">lease</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">graph</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">generate_new_anchoring</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Uploads a graph to the server and appends to the existing graph.</span>

<span class="sd">        Args:</span>
<span class="sd">            lease: Leases to show ownership of necessary resources. Will use the client&#39;s leases by default.</span>
<span class="sd">            graph: Graph protobuf that represents the map with waypoints and edges.</span>
<span class="sd">            generate_new_anchoring: Whether to generate an (overwrite the) anchoring on upload.</span>
<span class="sd">        Returns:</span>
<span class="sd">            The response, which includes waypoint and edge id&#39;s sorted by whether it was cached.</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot.</span>
<span class="sd">            UploadGraphError: Indicates a problem with the map provided.</span>
<span class="sd">            IncompatibleSensorsError: The map was recorded with different sensors than the robot.</span>
<span class="sd">            AreaCallbackError: The map includes area callback services not present on the robot.</span>
<span class="sd">            LeaseUseError: Error using provided lease.</span>
<span class="sd">            LicenseError: The robot&#39;s license is not valid.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_upload_graph_request</span><span class="p">(</span><span class="n">lease</span><span class="p">,</span> <span class="n">graph</span><span class="p">,</span> <span class="n">generate_new_anchoring</span><span class="p">)</span>
        <span class="c1"># Use streaming to upload the graph, if applicable.</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_use_streaming_graph_upload</span><span class="p">:</span>
            <span class="c1"># Need to manually apply request processors since this will be serialized and chunked.</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_apply_request_processors</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
            <span class="n">serialized</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="n">SerializeToString</span><span class="p">()</span>
            <span class="k">try</span><span class="p">:</span>
                <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">UploadGraphStreaming</span><span class="p">,</span>
                    <span class="n">GraphNavClient</span><span class="o">.</span><span class="n">_data_chunk_iterator_upload_graph</span><span class="p">(</span><span class="n">serialized</span><span class="p">,</span>
                                                                     <span class="bp">self</span><span class="o">.</span><span class="n">_data_chunk_size</span><span class="p">),</span>
                    <span class="n">value_from_response</span><span class="o">=</span><span class="n">_get_response</span><span class="p">,</span> <span class="n">error_from_response</span><span class="o">=</span><span class="n">_upload_graph_error</span><span class="p">,</span>
                    <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
            <span class="k">except</span> <span class="n">UnimplementedError</span><span class="p">:</span>
                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;UploadGraphStreaming unimplemented. Old robot release?&#39;</span><span class="p">)</span>
                <span class="c1"># Recreate the request so that we clear any state that might have happened during our attempt to stream.</span>
                <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_upload_graph_request</span><span class="p">(</span><span class="n">lease</span><span class="p">,</span> <span class="n">graph</span><span class="p">,</span> <span class="n">generate_new_anchoring</span><span class="p">)</span>
                <span class="c1"># Continue to regular UploadGraph.</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">UploadGraph</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="n">_get_response</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">_upload_graph_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.upload_graph_async"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.upload_graph_async">[docs]</a>    <span class="k">def</span> <span class="nf">upload_graph_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">lease</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">graph</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">generate_new_anchoring</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of upload_graph().&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_upload_graph_request</span><span class="p">(</span><span class="n">lease</span><span class="p">,</span> <span class="n">graph</span><span class="p">,</span> <span class="n">generate_new_anchoring</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">UploadGraph</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="n">_get_response</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">_upload_graph_error</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
                               <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.upload_waypoint_snapshot"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.upload_waypoint_snapshot">[docs]</a>    <span class="k">def</span> <span class="nf">upload_waypoint_snapshot</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">waypoint_snapshot</span><span class="p">,</span> <span class="n">lease</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Uploads large waypoint snapshot as a stream for a particular waypoint.</span>

<span class="sd">        Args:</span>
<span class="sd">            lease: Leases to show ownership of necessary resources. Will use the client&#39;s leases by default.</span>
<span class="sd">            waypoint_snapshot: WaypointSnapshot protobuf that will be stream-uploaded to the robot.</span>
<span class="sd">        Returns:</span>
<span class="sd">            The status of the upload request.</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot.</span>
<span class="sd">            LeaseUseError: Error using provided lease.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">lease</span> <span class="o">=</span> <span class="n">lease</span> <span class="ow">or</span> <span class="n">lease_pb2</span><span class="o">.</span><span class="n">Lease</span><span class="p">()</span>
        <span class="n">serialized</span> <span class="o">=</span> <span class="n">waypoint_snapshot</span><span class="o">.</span><span class="n">SerializeToString</span><span class="p">()</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">UploadWaypointSnapshot</span><span class="p">,</span>
            <span class="n">GraphNavClient</span><span class="o">.</span><span class="n">_data_chunk_iterator_upload_waypoint_snapshot</span><span class="p">(</span>
                <span class="n">serialized</span><span class="p">,</span> <span class="n">lease</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_data_chunk_size</span><span class="p">),</span> <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">_upload_waypoint_snapshot_error</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.upload_edge_snapshot"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.upload_edge_snapshot">[docs]</a>    <span class="k">def</span> <span class="nf">upload_edge_snapshot</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">edge_snapshot</span><span class="p">,</span> <span class="n">lease</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Uploads large edge snapshot as a stream for a particular edge.</span>

<span class="sd">        Args:</span>
<span class="sd">            lease: Leases to show ownership of necessary resources. Will use the client&#39;s leases by default.</span>
<span class="sd">            edge_snapshot: EdgeSnapshot protobuf that will be stream-uploaded to the robot.</span>
<span class="sd">        Returns:</span>
<span class="sd">            The status of the upload request.</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot.</span>
<span class="sd">            LeaseUseError: Error using provided leases.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">lease</span> <span class="o">=</span> <span class="n">lease</span> <span class="ow">or</span> <span class="n">lease_pb2</span><span class="o">.</span><span class="n">Lease</span><span class="p">()</span>
        <span class="n">serialized</span> <span class="o">=</span> <span class="n">edge_snapshot</span><span class="o">.</span><span class="n">SerializeToString</span><span class="p">()</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">UploadEdgeSnapshot</span><span class="p">,</span>
            <span class="n">GraphNavClient</span><span class="o">.</span><span class="n">_data_chunk_iterator_upload_edge_snapshot</span><span class="p">(</span><span class="n">serialized</span><span class="p">,</span> <span class="n">lease</span><span class="p">,</span>
                                                                     <span class="bp">self</span><span class="o">.</span><span class="n">_data_chunk_size</span><span class="p">),</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">handle_common_header_errors</span><span class="p">(</span><span class="n">common_lease_errors</span><span class="p">),</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.download_graph"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.download_graph">[docs]</a>    <span class="k">def</span> <span class="nf">download_graph</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Downloads the graph from the server.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The graph protobuf that represents the current map on the robot (with waypoints and edges).</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_download_graph_request</span><span class="p">()</span>
        <span class="c1"># Use streaming to download the graph, if applicable.</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_use_streaming_graph_upload</span><span class="p">:</span>
            <span class="k">try</span><span class="p">:</span>
                <span class="n">resp</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">DownloadGraphStreaming</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                                 <span class="n">value_from_response</span><span class="o">=</span><span class="n">_get_streamed_download_graph</span><span class="p">,</span>
                                 <span class="n">error_from_response</span><span class="o">=</span><span class="n">_download_graph_stream_errors</span><span class="p">,</span>
                                 <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
                <span class="k">return</span> <span class="n">resp</span>
            <span class="k">except</span> <span class="n">UnimplementedError</span><span class="p">:</span>
                <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;DownloadGraphStreaming unimplemented. Old robot release?&#39;</span><span class="p">)</span>
                <span class="c1"># Continue to regular DownloadGraph.</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">DownloadGraph</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="n">_get_graph</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.download_graph_async"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.download_graph_async">[docs]</a>    <span class="k">def</span> <span class="nf">download_graph_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of download_graph().&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_download_graph_request</span><span class="p">()</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">DownloadGraph</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="n">_get_graph</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
                               <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="GraphNavClient.download_waypoint_snapshot"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.download_waypoint_snapshot">[docs]</a>    <span class="k">def</span> <span class="nf">download_waypoint_snapshot</span><span class="p">(</span>
            <span class="bp">self</span><span class="p">,</span>
            <span class="n">waypoint_snapshot_id</span><span class="p">,</span>
            <span class="n">download_images</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">do_not_download_point_cloud</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Download a specific waypoint snapshot with streaming from the server.</span>

<span class="sd">        Args:</span>
<span class="sd">            waypoint_snapshot_id: WaypointSnapshot string ID for which snapshot to download from robot.</span>
<span class="sd">            download_images: Boolean indicating whether to include images in the download.</span>
<span class="sd">            do_not_download_point_cloud: Boolean indicating if point cloud data should not be downloaded.</span>
<span class="sd">        Returns:</span>
<span class="sd">            The WaypointSnapshot protobuf from the robot&#39;s current map.</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot</span>
<span class="sd">            UnknownMapInformationError: Snapshot id not found</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_download_waypoint_snapshot_request</span><span class="p">(</span>
            <span class="n">waypoint_snapshot_id</span><span class="p">,</span>
            <span class="n">download_images</span><span class="p">,</span>
            <span class="n">do_not_download_point_cloud</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">DownloadWaypointSnapshot</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                         <span class="n">value_from_response</span><span class="o">=</span><span class="n">_get_streamed_waypoint_snapshot</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">_download_waypoint_snapshot_stream_errors</span><span class="p">,</span>
                         <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>


<div class="viewcode-block" id="GraphNavClient.download_edge_snapshot"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.download_edge_snapshot">[docs]</a>    <span class="k">def</span> <span class="nf">download_edge_snapshot</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">edge_snapshot_id</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Downloads a specific edge snapshot with streaming from the server.</span>

<span class="sd">        Args:</span>
<span class="sd">            edge_snapshot_id: EdgeSnapshot string ID for which snapshot to download from robot.</span>
<span class="sd">        Returns:</span>
<span class="sd">            The EdgeSnapshot protobuf from the robot&#39;s current map.</span>
<span class="sd">        Raises:</span>
<span class="sd">            RpcError: Problem communicating with the robot</span>
<span class="sd">            UnknownMapInformationError: Snapshot id not found</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_build_download_edge_snapshot_request</span><span class="p">(</span><span class="n">edge_snapshot_id</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">DownloadEdgeSnapshot</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                         <span class="n">value_from_response</span><span class="o">=</span><span class="n">_get_streamed_edge_snapshot</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">_download_edge_snapshot_stream_errors</span><span class="p">,</span>
                         <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>


    <span class="k">def</span> <span class="nf">_write_bytes</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filepath</span><span class="p">,</span> <span class="n">filename</span><span class="p">,</span> <span class="n">data</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Write data to a file.&quot;&quot;&quot;</span>
        <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">filepath</span><span class="p">,</span> <span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
        <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">filepath</span> <span class="o">+</span> <span class="n">filename</span><span class="p">,</span> <span class="s1">&#39;wb+&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
            <span class="n">f</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>

<div class="viewcode-block" id="GraphNavClient.write_graph_and_snapshots"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.write_graph_and_snapshots">[docs]</a>    <span class="k">def</span> <span class="nf">write_graph_and_snapshots</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">directory</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Download the graph and snapshots from robot to the specified directory.&quot;&quot;&quot;</span>
        <span class="n">graph</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">download_graph</span><span class="p">()</span>
        <span class="n">graph_bytes</span> <span class="o">=</span> <span class="n">graph</span><span class="o">.</span><span class="n">SerializeToString</span><span class="p">()</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_write_bytes</span><span class="p">(</span><span class="n">directory</span><span class="p">,</span> <span class="s1">&#39;/graph&#39;</span><span class="p">,</span> <span class="n">graph_bytes</span><span class="p">)</span>

        <span class="k">for</span> <span class="n">waypoint</span> <span class="ow">in</span> <span class="n">graph</span><span class="o">.</span><span class="n">waypoints</span><span class="p">:</span>
            <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">waypoint</span><span class="o">.</span><span class="n">snapshot_id</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
                <span class="k">continue</span>
            <span class="n">waypoint_snapshot</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">download_waypoint_snapshot</span><span class="p">(</span><span class="n">waypoint</span><span class="o">.</span><span class="n">snapshot_id</span><span class="p">)</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_write_bytes</span><span class="p">(</span><span class="n">directory</span> <span class="o">+</span> <span class="s1">&#39;/waypoint_snapshots&#39;</span><span class="p">,</span> <span class="s1">&#39;/&#39;</span> <span class="o">+</span> <span class="n">waypoint</span><span class="o">.</span><span class="n">snapshot_id</span><span class="p">,</span>
                              <span class="n">waypoint_snapshot</span><span class="o">.</span><span class="n">SerializeToString</span><span class="p">())</span>

        <span class="k">for</span> <span class="n">edge</span> <span class="ow">in</span> <span class="n">graph</span><span class="o">.</span><span class="n">edges</span><span class="p">:</span>
            <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">edge</span><span class="o">.</span><span class="n">snapshot_id</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
                <span class="k">continue</span>
            <span class="n">edge_snapshot</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">download_edge_snapshot</span><span class="p">(</span><span class="n">edge</span><span class="o">.</span><span class="n">snapshot_id</span><span class="p">)</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_write_bytes</span><span class="p">(</span><span class="n">directory</span> <span class="o">+</span> <span class="s1">&#39;/edge_snapshots&#39;</span><span class="p">,</span> <span class="s1">&#39;/&#39;</span> <span class="o">+</span> <span class="n">edge</span><span class="o">.</span><span class="n">snapshot_id</span><span class="p">,</span>
                              <span class="n">edge_snapshot</span><span class="o">.</span><span class="n">SerializeToString</span><span class="p">())</span></div>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_build_set_localization_request</span><span class="p">(</span>
            <span class="n">initial_guess_localization</span><span class="p">,</span> <span class="n">ko_tform_body</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">max_distance</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">max_yaw</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
            <span class="n">fiducial_init</span><span class="o">=</span><span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationRequest</span><span class="o">.</span><span class="n">FIDUCIAL_INIT_NEAREST</span><span class="p">,</span>
            <span class="n">use_fiducial_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">refine_fiducial_result_with_icp</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">do_ambiguity_check</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="n">refine_with_visual_features</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">verify_visual_features_quality</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationRequest</span><span class="p">(</span><span class="n">fiducial_init</span><span class="o">=</span><span class="n">fiducial_init</span><span class="p">)</span>
        <span class="n">request</span><span class="o">.</span><span class="n">initial_guess</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">initial_guess_localization</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">ko_tform_body</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">ko_tform_body</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">ko_tform_body</span><span class="p">)</span>

        <span class="k">if</span> <span class="n">max_distance</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">max_distance</span> <span class="o">=</span> <span class="n">max_distance</span>
        <span class="k">if</span> <span class="n">max_yaw</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">max_yaw</span> <span class="o">=</span> <span class="n">max_yaw</span>

        <span class="k">if</span> <span class="p">(</span><span class="n">fiducial_init</span> <span class="o">==</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationRequest</span><span class="o">.</span><span class="n">FIDUCIAL_INIT_SPECIFIC</span><span class="p">):</span>
            <span class="k">if</span> <span class="n">use_fiducial_id</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
                <span class="n">request</span><span class="o">.</span><span class="n">use_fiducial_id</span> <span class="o">=</span> <span class="n">use_fiducial_id</span>

        <span class="k">if</span> <span class="n">refine_with_visual_features</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">refine_with_visual_features</span><span class="o">.</span><span class="n">verify_refinement_quality</span> <span class="o">=</span> <span class="n">verify_visual_features_quality</span>
        <span class="k">elif</span> <span class="n">refine_fiducial_result_with_icp</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">refine_fiducial_result_with_icp</span> <span class="o">=</span> <span class="n">refine_fiducial_result_with_icp</span>
        <span class="n">request</span><span class="o">.</span><span class="n">do_ambiguity_check</span> <span class="o">=</span> <span class="n">do_ambiguity_check</span>
        <span class="k">return</span> <span class="n">request</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_build_get_localization_state_request</span><span class="p">(</span><span class="n">request_live_point_cloud</span><span class="p">,</span> <span class="n">request_live_images</span><span class="p">,</span>
                                              <span class="n">request_live_terrain_maps</span><span class="p">,</span> <span class="n">request_live_world_objects</span><span class="p">,</span>
                                              <span class="n">request_live_robot_state</span><span class="p">,</span> <span class="n">waypoint_id</span><span class="p">,</span>
                                              <span class="n">request_gps_state</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">GetLocalizationStateRequest</span><span class="p">(</span>
            <span class="n">request_live_point_cloud</span><span class="o">=</span><span class="n">request_live_point_cloud</span><span class="p">,</span>
            <span class="n">request_live_images</span><span class="o">=</span><span class="n">request_live_images</span><span class="p">,</span>
            <span class="n">request_live_terrain_maps</span><span class="o">=</span><span class="n">request_live_terrain_maps</span><span class="p">,</span>
            <span class="n">request_live_world_objects</span><span class="o">=</span><span class="n">request_live_world_objects</span><span class="p">,</span>
            <span class="n">request_live_robot_state</span><span class="o">=</span><span class="n">request_live_robot_state</span><span class="p">,</span> <span class="n">waypoint_id</span><span class="o">=</span><span class="n">waypoint_id</span><span class="p">,</span>
            <span class="n">request_gps_state</span><span class="o">=</span><span class="n">request_gps_state</span><span class="p">)</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_build_navigate_route_request</span><span class="p">(</span>
        <span class="n">route</span><span class="p">,</span>
        <span class="n">route_follow_params</span><span class="p">,</span>
        <span class="n">travel_params</span><span class="p">,</span>
        <span class="n">end_time_secs</span><span class="p">,</span>
        <span class="n">leases</span><span class="p">,</span>
        <span class="n">timesync_endpoint</span><span class="p">,</span>
        <span class="n">command_id</span><span class="p">,</span>
        <span class="n">destination_waypoint_tform_body_goal</span><span class="p">,</span>
    <span class="p">):</span>
        <span class="n">converter</span> <span class="o">=</span> <span class="n">timesync_endpoint</span><span class="o">.</span><span class="n">get_robot_time_converter</span><span class="p">()</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteRequest</span><span class="p">(</span>
            <span class="n">route</span><span class="o">=</span><span class="n">route</span><span class="p">,</span> <span class="n">route_follow_params</span><span class="o">=</span><span class="n">route_follow_params</span><span class="p">,</span>
            <span class="n">destination_waypoint_tform_body_goal</span><span class="o">=</span><span class="n">destination_waypoint_tform_body_goal</span><span class="p">,</span>
            <span class="n">clock_identifier</span><span class="o">=</span><span class="n">timesync_endpoint</span><span class="o">.</span><span class="n">clock_identifier</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">travel_params</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">travel_params</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">travel_params</span><span class="p">)</span>
        <span class="n">request</span><span class="o">.</span><span class="n">end_time</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span>
            <span class="n">converter</span><span class="o">.</span><span class="n">robot_timestamp_from_local_secs</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">+</span> <span class="n">end_time_secs</span><span class="p">))</span>
        <span class="k">if</span> <span class="n">command_id</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">command_id</span> <span class="o">=</span> <span class="n">command_id</span>
        <span class="k">return</span> <span class="n">request</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_build_navigate_to_request</span><span class="p">(</span><span class="n">destination_waypoint_id</span><span class="p">,</span> <span class="n">travel_params</span><span class="p">,</span> <span class="n">route_params</span><span class="p">,</span>
                                   <span class="n">end_time_secs</span><span class="p">,</span> <span class="n">leases</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="p">,</span> <span class="n">command_id</span><span class="p">,</span>
                                   <span class="n">destination_waypoint_tform_body_goal</span><span class="p">,</span> <span class="n">route_blocked_behavior</span><span class="p">):</span>
        <span class="n">converter</span> <span class="o">=</span> <span class="n">timesync_endpoint</span><span class="o">.</span><span class="n">get_robot_time_converter</span><span class="p">()</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToRequest</span><span class="p">(</span>
            <span class="n">destination_waypoint_id</span><span class="o">=</span><span class="n">destination_waypoint_id</span><span class="p">,</span>
            <span class="n">destination_waypoint_tform_body_goal</span><span class="o">=</span><span class="n">destination_waypoint_tform_body_goal</span><span class="p">,</span>
            <span class="n">clock_identifier</span><span class="o">=</span><span class="n">timesync_endpoint</span><span class="o">.</span><span class="n">clock_identifier</span><span class="p">)</span>
        <span class="n">request</span><span class="o">.</span><span class="n">end_time</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span>
            <span class="n">converter</span><span class="o">.</span><span class="n">robot_timestamp_from_local_secs</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">+</span> <span class="n">end_time_secs</span><span class="p">))</span>
        <span class="k">if</span> <span class="n">travel_params</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">travel_params</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">travel_params</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">route_params</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">route_params</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">route_params</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">command_id</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">command_id</span> <span class="o">=</span> <span class="n">command_id</span>
        <span class="k">if</span> <span class="n">route_blocked_behavior</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">route_blocked_behavior</span> <span class="o">=</span> <span class="n">route_blocked_behavior</span>
        <span class="k">return</span> <span class="n">request</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_build_navigate_to_anchor_request</span><span class="p">(</span><span class="n">seed_tform_goal</span><span class="p">,</span> <span class="n">travel_params</span><span class="p">,</span> <span class="n">route_params</span><span class="p">,</span>
                                          <span class="n">end_time_secs</span><span class="p">,</span> <span class="n">leases</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="p">,</span> <span class="n">command_id</span><span class="p">,</span>
                                          <span class="n">goal_waypoint_rt_seed_ewrt_seed_tolerance</span><span class="p">,</span>
                                          <span class="n">gps_navigation_params</span><span class="p">):</span>
        <span class="n">converter</span> <span class="o">=</span> <span class="n">timesync_endpoint</span><span class="o">.</span><span class="n">get_robot_time_converter</span><span class="p">()</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorRequest</span><span class="p">(</span>
            <span class="n">seed_tform_goal</span><span class="o">=</span><span class="n">seed_tform_goal</span><span class="p">,</span>
            <span class="n">goal_waypoint_rt_seed_ewrt_seed_tolerance</span><span class="o">=</span><span class="n">goal_waypoint_rt_seed_ewrt_seed_tolerance</span><span class="p">,</span>
            <span class="n">clock_identifier</span><span class="o">=</span><span class="n">timesync_endpoint</span><span class="o">.</span><span class="n">clock_identifier</span><span class="p">)</span>
        <span class="c1"># Note that this overrides the seed_tform_goal, which is a OneOf.</span>
        <span class="k">if</span> <span class="n">gps_navigation_params</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">gps_navigation_params</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">gps_navigation_params</span><span class="p">)</span>
        <span class="n">request</span><span class="o">.</span><span class="n">end_time</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span>
            <span class="n">converter</span><span class="o">.</span><span class="n">robot_timestamp_from_local_secs</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">+</span> <span class="n">end_time_secs</span><span class="p">))</span>
        <span class="k">if</span> <span class="n">travel_params</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">travel_params</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">travel_params</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">route_params</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">route_params</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">route_params</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">command_id</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">command_id</span> <span class="o">=</span> <span class="n">command_id</span>
        <span class="k">return</span> <span class="n">request</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_build_clear_graph_request</span><span class="p">(</span><span class="n">lease</span><span class="p">):</span>
        <span class="n">lease</span> <span class="o">=</span> <span class="n">lease</span> <span class="ow">or</span> <span class="n">lease_pb2</span><span class="o">.</span><span class="n">Lease</span><span class="p">()</span>
        <span class="k">return</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">ClearGraphRequest</span><span class="p">(</span><span class="n">lease</span><span class="o">=</span><span class="n">lease</span><span class="p">)</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_build_navigate_feedback_request</span><span class="p">(</span><span class="n">command_id</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigationFeedbackRequest</span><span class="p">(</span><span class="n">command_id</span><span class="o">=</span><span class="n">command_id</span><span class="p">)</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_build_upload_graph_request</span><span class="p">(</span><span class="n">lease</span><span class="p">,</span> <span class="n">graph</span><span class="p">,</span> <span class="n">generate_new_anchoring</span><span class="p">):</span>
        <span class="n">lease</span> <span class="o">=</span> <span class="n">lease</span> <span class="ow">or</span> <span class="n">lease_pb2</span><span class="o">.</span><span class="n">Lease</span><span class="p">()</span>
        <span class="k">return</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadGraphRequest</span><span class="p">(</span><span class="n">lease</span><span class="o">=</span><span class="n">lease</span><span class="p">,</span> <span class="n">graph</span><span class="o">=</span><span class="n">graph</span><span class="p">,</span>
                                                <span class="n">generate_new_anchoring</span><span class="o">=</span><span class="n">generate_new_anchoring</span><span class="p">)</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_data_chunk_iterator_upload_graph</span><span class="p">(</span><span class="n">serialized_upload_graph</span><span class="p">,</span> <span class="n">data_chunk_byte_size</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Converts a serialized UploadGraphRequest into a series of UploadGraphStreamingRequests.&quot;&quot;&quot;</span>
        <span class="n">total_bytes_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">serialized_upload_graph</span><span class="p">)</span>
        <span class="n">num_chunks</span> <span class="o">=</span> <span class="n">math</span><span class="o">.</span><span class="n">ceil</span><span class="p">(</span><span class="n">total_bytes_size</span> <span class="o">/</span> <span class="n">data_chunk_byte_size</span><span class="p">)</span>
        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">num_chunks</span><span class="p">):</span>
            <span class="n">start_index</span> <span class="o">=</span> <span class="n">i</span> <span class="o">*</span> <span class="n">data_chunk_byte_size</span>
            <span class="n">end_index</span> <span class="o">=</span> <span class="p">(</span><span class="n">i</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">*</span> <span class="n">data_chunk_byte_size</span>
            <span class="n">chunk</span> <span class="o">=</span> <span class="n">data_chunk_pb2</span><span class="o">.</span><span class="n">DataChunk</span><span class="p">(</span><span class="n">total_size</span><span class="o">=</span><span class="n">total_bytes_size</span><span class="p">)</span>
            <span class="k">if</span> <span class="p">(</span><span class="n">end_index</span> <span class="o">&gt;</span> <span class="n">total_bytes_size</span><span class="p">):</span>
                <span class="n">chunk</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">serialized_upload_graph</span><span class="p">[</span><span class="n">start_index</span><span class="p">:</span><span class="n">total_bytes_size</span><span class="p">]</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">chunk</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">serialized_upload_graph</span><span class="p">[</span><span class="n">start_index</span><span class="p">:</span><span class="n">end_index</span><span class="p">]</span>
            <span class="n">req</span> <span class="o">=</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadGraphStreamingRequest</span><span class="p">(</span><span class="n">chunk</span><span class="o">=</span><span class="n">chunk</span><span class="p">)</span>
            <span class="k">yield</span> <span class="n">req</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_data_chunk_iterator_upload_waypoint_snapshot</span><span class="p">(</span><span class="n">serialized_waypoint_snapshot</span><span class="p">,</span> <span class="n">lease</span><span class="p">,</span>
                                                      <span class="n">data_chunk_byte_size</span><span class="p">):</span>
        <span class="n">total_bytes_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">serialized_waypoint_snapshot</span><span class="p">)</span>
        <span class="n">num_chunks</span> <span class="o">=</span> <span class="n">math</span><span class="o">.</span><span class="n">ceil</span><span class="p">(</span><span class="n">total_bytes_size</span> <span class="o">/</span> <span class="n">data_chunk_byte_size</span><span class="p">)</span>
        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">num_chunks</span><span class="p">):</span>
            <span class="n">start_index</span> <span class="o">=</span> <span class="n">i</span> <span class="o">*</span> <span class="n">data_chunk_byte_size</span>
            <span class="n">end_index</span> <span class="o">=</span> <span class="p">(</span><span class="n">i</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">*</span> <span class="n">data_chunk_byte_size</span>
            <span class="n">chunk</span> <span class="o">=</span> <span class="n">data_chunk_pb2</span><span class="o">.</span><span class="n">DataChunk</span><span class="p">(</span><span class="n">total_size</span><span class="o">=</span><span class="n">total_bytes_size</span><span class="p">)</span>
            <span class="k">if</span> <span class="p">(</span><span class="n">end_index</span> <span class="o">&gt;</span> <span class="n">total_bytes_size</span><span class="p">):</span>
                <span class="n">chunk</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">serialized_waypoint_snapshot</span><span class="p">[</span><span class="n">start_index</span><span class="p">:</span><span class="n">total_bytes_size</span><span class="p">]</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">chunk</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">serialized_waypoint_snapshot</span><span class="p">[</span><span class="n">start_index</span><span class="p">:</span><span class="n">end_index</span><span class="p">]</span>
            <span class="n">req</span> <span class="o">=</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadWaypointSnapshotRequest</span><span class="p">(</span><span class="n">lease</span><span class="o">=</span><span class="n">lease</span><span class="p">,</span> <span class="n">chunk</span><span class="o">=</span><span class="n">chunk</span><span class="p">)</span>
            <span class="k">yield</span> <span class="n">req</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_data_chunk_iterator_upload_edge_snapshot</span><span class="p">(</span><span class="n">serialized_edge_snapshot</span><span class="p">,</span> <span class="n">lease</span><span class="p">,</span>
                                                  <span class="n">data_chunk_byte_size</span><span class="p">):</span>
        <span class="n">total_bytes_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">serialized_edge_snapshot</span><span class="p">)</span>
        <span class="n">num_chunks</span> <span class="o">=</span> <span class="n">math</span><span class="o">.</span><span class="n">ceil</span><span class="p">(</span><span class="n">total_bytes_size</span> <span class="o">/</span> <span class="n">data_chunk_byte_size</span><span class="p">)</span>
        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">num_chunks</span><span class="p">):</span>
            <span class="n">start_index</span> <span class="o">=</span> <span class="n">i</span> <span class="o">*</span> <span class="n">data_chunk_byte_size</span>
            <span class="n">end_index</span> <span class="o">=</span> <span class="p">(</span><span class="n">i</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">*</span> <span class="n">data_chunk_byte_size</span>
            <span class="n">chunk</span> <span class="o">=</span> <span class="n">data_chunk_pb2</span><span class="o">.</span><span class="n">DataChunk</span><span class="p">(</span><span class="n">total_size</span><span class="o">=</span><span class="n">total_bytes_size</span><span class="p">)</span>
            <span class="k">if</span> <span class="p">(</span><span class="n">end_index</span> <span class="o">&gt;</span> <span class="n">total_bytes_size</span><span class="p">):</span>
                <span class="n">chunk</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">serialized_edge_snapshot</span><span class="p">[</span><span class="n">start_index</span><span class="p">:</span><span class="n">total_bytes_size</span><span class="p">]</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">chunk</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">serialized_edge_snapshot</span><span class="p">[</span><span class="n">start_index</span><span class="p">:</span><span class="n">end_index</span><span class="p">]</span>
            <span class="n">req</span> <span class="o">=</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadEdgeSnapshotRequest</span><span class="p">(</span><span class="n">lease</span><span class="o">=</span><span class="n">lease</span><span class="p">,</span> <span class="n">chunk</span><span class="o">=</span><span class="n">chunk</span><span class="p">)</span>
            <span class="k">yield</span> <span class="n">req</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_build_download_graph_request</span><span class="p">():</span>
        <span class="k">return</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">DownloadGraphRequest</span><span class="p">()</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_build_download_waypoint_snapshot_request</span><span class="p">(</span>
            <span class="n">waypoint_snapshot_id</span><span class="p">,</span>
            <span class="n">download_images</span><span class="p">,</span>
            <span class="n">do_not_download_point_cloud</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">DownloadWaypointSnapshotRequest</span><span class="p">(</span>
            <span class="n">waypoint_snapshot_id</span><span class="o">=</span><span class="n">waypoint_snapshot_id</span><span class="p">,</span>
            <span class="n">download_images</span><span class="o">=</span><span class="n">download_images</span><span class="p">,</span>
            <span class="n">do_not_download_point_cloud</span><span class="o">=</span><span class="n">do_not_download_point_cloud</span><span class="p">)</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_build_download_edge_snapshot_request</span><span class="p">(</span><span class="n">edge_snapshot_id</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">DownloadEdgeSnapshotRequest</span><span class="p">(</span><span class="n">edge_snapshot_id</span><span class="o">=</span><span class="n">edge_snapshot_id</span><span class="p">)</span>

<div class="viewcode-block" id="GraphNavClient.generate_travel_params"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.generate_travel_params">[docs]</a>    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">generate_travel_params</span><span class="p">(</span><span class="n">max_distance</span><span class="p">,</span> <span class="n">max_yaw</span><span class="p">,</span> <span class="n">velocity_limit</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot; Generate the API TravelParams for navigation requests.</span>

<span class="sd">        Args:</span>
<span class="sd">            max_distance: Distances (meters) threshold for when we&#39;ve reached the final waypoint.</span>
<span class="sd">            max_yaw: Angle (radians) threshold for when we&#39;ve reached the final waypoint.</span>
<span class="sd">            velocity_limit: SE2VelocityLimit protobuf message for the speed the robot should use.</span>
<span class="sd">        Returns:</span>
<span class="sd">            The API TravelParams protobuf message.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">travel_params</span> <span class="o">=</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">TravelParams</span><span class="p">(</span><span class="n">max_distance</span><span class="o">=</span><span class="n">max_distance</span><span class="p">,</span> <span class="n">max_yaw</span><span class="o">=</span><span class="n">max_yaw</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">velocity_limit</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">travel_params</span><span class="o">.</span><span class="n">velocity_limit</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">velocity_limit</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">travel_params</span></div>

<div class="viewcode-block" id="GraphNavClient.build_route"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavClient.build_route">[docs]</a>    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">build_route</span><span class="p">(</span><span class="n">waypoint_id_list</span><span class="p">,</span> <span class="n">edge_id_list</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot; Generate the API Route for navigation requests.</span>

<span class="sd">        Args:</span>
<span class="sd">            waypoint_id_list: List of waypoint id strings in which a route should pass through.</span>
<span class="sd">                                The ids should be ordered from [start waypoint --&gt; destination waypoint].</span>
<span class="sd">            edge_id_list: List of the edge_id&#39;s which should be in the same ordering as the waypoint list.</span>
<span class="sd">        Returns:</span>
<span class="sd">            The API Route protobuf message.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">route</span> <span class="o">=</span> <span class="n">nav_pb2</span><span class="o">.</span><span class="n">Route</span><span class="p">()</span>
        <span class="n">route</span><span class="o">.</span><span class="n">waypoint_id</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">waypoint_id_list</span><span class="p">)</span>
        <span class="n">route</span><span class="o">.</span><span class="n">edge_id</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">edge_id_list</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">route</span></div></div>


<span class="sd">&#39;&#39;&#39;</span>
<span class="sd">Static helper methods for handing responses and errors.</span>
<span class="sd">&#39;&#39;&#39;</span>


<div class="viewcode-block" id="GraphNavServiceResponseError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.GraphNavServiceResponseError">[docs]</a><span class="k">class</span> <span class="nc">GraphNavServiceResponseError</span><span class="p">(</span><span class="n">ResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;General class of errors for the GraphNav Recording Service.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="UploadWaypointSnapshotError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.UploadWaypointSnapshotError">[docs]</a><span class="k">class</span> <span class="nc">UploadWaypointSnapshotError</span><span class="p">(</span><span class="n">GraphNavServiceResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Errors related to uploading a waypoint snapshot&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="UploadGraphError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.UploadGraphError">[docs]</a><span class="k">class</span> <span class="nc">UploadGraphError</span><span class="p">(</span><span class="n">GraphNavServiceResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Errors related to uploading a graph.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="MapTooLargeLicenseError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.MapTooLargeLicenseError">[docs]</a><span class="k">class</span> <span class="nc">MapTooLargeLicenseError</span><span class="p">(</span><span class="n">UploadGraphError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The map is too large for the license on the robot.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="InvalidGraphError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.InvalidGraphError">[docs]</a><span class="k">class</span> <span class="nc">InvalidGraphError</span><span class="p">(</span><span class="n">UploadGraphError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The graph is invalid topologically, e.g. missing waypoints referenced by edges.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="IncompatibleSensorsError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.IncompatibleSensorsError">[docs]</a><span class="k">class</span> <span class="nc">IncompatibleSensorsError</span><span class="p">(</span><span class="n">GraphNavServiceResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The map was recorded with using a sensor configuration which is incompatible with the robot (for example, LIDAR configuration).&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="AreaCallbackMapError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.AreaCallbackMapError">[docs]</a><span class="k">class</span> <span class="nc">AreaCallbackMapError</span><span class="p">(</span><span class="n">GraphNavServiceResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The map specified an area callback that is not registered or is faulted.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="RequestAbortedError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.RequestAbortedError">[docs]</a><span class="k">class</span> <span class="nc">RequestAbortedError</span><span class="p">(</span><span class="n">GraphNavServiceResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Request was aborted by the system.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="RequestFailedError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.RequestFailedError">[docs]</a><span class="k">class</span> <span class="nc">RequestFailedError</span><span class="p">(</span><span class="n">GraphNavServiceResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Request failed to complete by the system.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="RobotFaultedError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.RobotFaultedError">[docs]</a><span class="k">class</span> <span class="nc">RobotFaultedError</span><span class="p">(</span><span class="n">GraphNavServiceResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Robot is experiencing a fault condition that prevents localization.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="UnknownMapInformationError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.UnknownMapInformationError">[docs]</a><span class="k">class</span> <span class="nc">UnknownMapInformationError</span><span class="p">(</span><span class="n">GraphNavServiceResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The given map information (waypoints,edges,routes) is unknown by the system.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="TimeError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.TimeError">[docs]</a><span class="k">class</span> <span class="nc">TimeError</span><span class="p">(</span><span class="n">GraphNavServiceResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Errors associated with timestamps and time sync.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="CommandExpiredError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.CommandExpiredError">[docs]</a><span class="k">class</span> <span class="nc">CommandExpiredError</span><span class="p">(</span><span class="n">TimeError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The command was received after its end time had already passed.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="NoTimeSyncError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.NoTimeSyncError">[docs]</a><span class="k">class</span> <span class="nc">NoTimeSyncError</span><span class="p">(</span><span class="n">TimeError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Client has not performed timesync with robot.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="TooDistantError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.TooDistantError">[docs]</a><span class="k">class</span> <span class="nc">TooDistantError</span><span class="p">(</span><span class="n">TimeError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The command was too far in the future.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="RobotStateError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.RobotStateError">[docs]</a><span class="k">class</span> <span class="nc">RobotStateError</span><span class="p">(</span><span class="n">GraphNavServiceResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Errors associated with the current state of the robot.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="IsRecordingError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.IsRecordingError">[docs]</a><span class="k">class</span> <span class="nc">IsRecordingError</span><span class="p">(</span><span class="n">RobotStateError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Cannot navigate a route while recording a map.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="CannotModifyMapDuringRecordingError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.CannotModifyMapDuringRecordingError">[docs]</a><span class="k">class</span> <span class="nc">CannotModifyMapDuringRecordingError</span><span class="p">(</span><span class="n">RobotStateError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Cannot clear the map during recording. Call StopRecording first.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="RobotImpairedError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.RobotImpairedError">[docs]</a><span class="k">class</span> <span class="nc">RobotImpairedError</span><span class="p">(</span><span class="n">RobotStateError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Robot has a critical perception or behavior fault and cannot navigate.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="RouteError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.RouteError">[docs]</a><span class="k">class</span> <span class="nc">RouteError</span><span class="p">(</span><span class="n">GraphNavServiceResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Errors associated with the specified route.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="ConstraintFaultError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.ConstraintFaultError">[docs]</a><span class="k">class</span> <span class="nc">ConstraintFaultError</span><span class="p">(</span><span class="n">RouteError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Route parameters contained a constraint fault.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="InvalidEdgeError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.InvalidEdgeError">[docs]</a><span class="k">class</span> <span class="nc">InvalidEdgeError</span><span class="p">(</span><span class="n">RouteError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;One or more edges do not connect to expected waypoints.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="UnkownRouteElementsError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.UnkownRouteElementsError">[docs]</a><span class="nd">@deprecated</span><span class="p">(</span><span class="n">reason</span><span class="o">=</span><span class="s1">&#39;Use UnknownRouteElementsError instead&#39;</span><span class="p">,</span> <span class="n">version</span><span class="o">=</span><span class="s1">&#39;3.0.0&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s1">&#39;ignore&#39;</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">UnkownRouteElementsError</span><span class="p">(</span><span class="n">RouteError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;One or more waypoints/edges are not in the map.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="UnknownRouteElementsError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.UnknownRouteElementsError">[docs]</a><span class="k">class</span> <span class="nc">UnknownRouteElementsError</span><span class="p">(</span><span class="n">UnkownRouteElementsError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;One or more waypoints/edges are not in the map.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="NoPathError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.NoPathError">[docs]</a><span class="k">class</span> <span class="nc">NoPathError</span><span class="p">(</span><span class="n">RouteError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;There is no path to the specified waypoint.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="UnknownWaypointError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.UnknownWaypointError">[docs]</a><span class="k">class</span> <span class="nc">UnknownWaypointError</span><span class="p">(</span><span class="n">RouteError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;One or more waypoints are not in the map.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="NoAnchoringError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.NoAnchoringError">[docs]</a><span class="k">class</span> <span class="nc">NoAnchoringError</span><span class="p">(</span><span class="n">RouteError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;There is no anchoring.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="InvalidPoseError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.InvalidPoseError">[docs]</a><span class="k">class</span> <span class="nc">InvalidPoseError</span><span class="p">(</span><span class="n">RouteError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The requested pose is invalid, or known to be unachievable.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="RouteNavigationError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.RouteNavigationError">[docs]</a><span class="k">class</span> <span class="nc">RouteNavigationError</span><span class="p">(</span><span class="n">GraphNavServiceResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Errors related to how the robot navigates the route.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="FeatureDesertError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.FeatureDesertError">[docs]</a><span class="k">class</span> <span class="nc">FeatureDesertError</span><span class="p">(</span><span class="n">RouteNavigationError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Route contained too many waypoints with low-quality features.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="RouteNotUpdatingError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.RouteNotUpdatingError">[docs]</a><span class="k">class</span> <span class="nc">RouteNotUpdatingError</span><span class="p">(</span><span class="n">RouteNavigationError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Graph nav was unable to update and follow the specified route.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="RobotLostError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.RobotLostError">[docs]</a><span class="k">class</span> <span class="nc">RobotLostError</span><span class="p">(</span><span class="n">RouteNavigationError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Cannot issue a navigation request when the robot is already lost.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="InvalidGPSError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.InvalidGPSError">[docs]</a><span class="k">class</span> <span class="nc">InvalidGPSError</span><span class="p">(</span><span class="n">RouteNavigationError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Cannot issue the GPS command because it is invalid.&quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="nf">_gps_status_to_string</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">status</span><span class="p">):</span>
        <span class="k">if</span> <span class="n">status</span> <span class="o">==</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">GPS_STATUS_OK</span><span class="p">:</span>
            <span class="k">return</span> <span class="s1">&#39;OK&#39;</span>
        <span class="k">elif</span> <span class="n">status</span> <span class="o">==</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">GPS_STATUS_NO_COORDS_IN_MAP</span><span class="p">:</span>
            <span class="k">return</span> <span class="s1">&#39;The uploaded map did not contain any valid GPS coordinates.&#39;</span>
        <span class="k">elif</span> <span class="n">status</span> <span class="o">==</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">GPS_STATUS_TOO_FAR_FROM_MAP</span><span class="p">:</span>
            <span class="k">return</span> <span class="s1">&#39;The given coordinates were too far from any coordinates in the uploaded map.&#39;</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="k">return</span> <span class="s1">&#39;Unknown error&#39;</span>

    <span class="k">def</span> <span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="sa">f</span><span class="s1">&#39;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">error_message</span><span class="si">}</span><span class="s1"> (reason: </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_gps_status_to_string</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">response</span><span class="o">.</span><span class="n">gps_status</span><span class="p">)</span><span class="si">}</span><span class="s1">)&#39;</span></div>


<div class="viewcode-block" id="RobotNotLocalizedToRouteError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.RobotNotLocalizedToRouteError">[docs]</a><span class="k">class</span> <span class="nc">RobotNotLocalizedToRouteError</span><span class="p">(</span><span class="n">RouteNavigationError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The current localization doesn&#39;t refer to any waypoint in the route (possibly uninitialized localization).&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="RobotStuckError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.RobotStuckError">[docs]</a><span class="k">class</span> <span class="nc">RobotStuckError</span><span class="p">(</span><span class="n">RouteNavigationError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The robot is stuck or unable to find a way forward. Resend the command with a new ID, or send a different command to try again.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="UnrecongizedCommandError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.UnrecongizedCommandError">[docs]</a><span class="nd">@deprecated</span><span class="p">(</span><span class="n">reason</span><span class="o">=</span><span class="s1">&#39;Use UnrecognizedCommandError instead&#39;</span><span class="p">,</span> <span class="n">version</span><span class="o">=</span><span class="s1">&#39;3.1.0&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s1">&#39;ignore&#39;</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">UnrecongizedCommandError</span><span class="p">(</span><span class="n">RouteNavigationError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Happens when you try to continue a command that was either expired, or had an unrecognized id.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="UnrecognizedCommandError"><a class="viewcode-back" href="../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html#bosdyn.client.graph_nav.UnrecognizedCommandError">[docs]</a><span class="k">class</span> <span class="nc">UnrecognizedCommandError</span><span class="p">(</span><span class="n">UnrecongizedCommandError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Happens when you try to continue a command that was either expired, or had an unrecognized id.&quot;&quot;&quot;</span></div>


<span class="k">def</span> <span class="nf">_localization_from_response</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return the localization state from the response.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">response</span><span class="o">.</span><span class="n">localization</span>


<span class="k">def</span> <span class="nf">_command_id_from_navigate_route_response</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return the navigation command id from the response.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">response</span><span class="o">.</span><span class="n">command_id</span>


<span class="k">def</span> <span class="nf">_get_status</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return the status of the response.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span>


<span class="k">def</span> <span class="nf">_get_response</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return full response for RecordStatus to get environment and is_recording information.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">response</span>


<span class="k">def</span> <span class="nf">_get_graph</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Returns the graph from the response.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">response</span><span class="o">.</span><span class="n">graph</span>


<span class="k">def</span> <span class="nf">_get_streamed_data</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="n">data_type</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Given a list of streamed responses, return an instance of the given data type that is parsed from those responses.&quot;&quot;&quot;</span>
    <span class="n">data</span> <span class="o">=</span> <span class="nb">bytes</span><span class="p">()</span>
    <span class="k">for</span> <span class="n">resp</span> <span class="ow">in</span> <span class="n">response</span><span class="p">:</span>
        <span class="n">data</span> <span class="o">+=</span> <span class="n">resp</span><span class="o">.</span><span class="n">chunk</span><span class="o">.</span><span class="n">data</span>
    <span class="n">proto_instance</span> <span class="o">=</span> <span class="n">data_type</span><span class="p">()</span>
    <span class="n">proto_instance</span><span class="o">.</span><span class="n">ParseFromString</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">proto_instance</span>


<span class="k">def</span> <span class="nf">_get_streamed_download_graph</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Reads a streamed response to recreate a DownloadGraphRequest&quot;&quot;&quot;</span>
    <span class="n">download_graph</span> <span class="o">=</span> <span class="n">_get_streamed_data</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">DownloadGraphResponse</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">download_graph</span><span class="o">.</span><span class="n">graph</span>


<span class="k">def</span> <span class="nf">_get_streamed_waypoint_snapshot</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Reads a streamed response to recreate a waypoint snapshot.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">_get_streamed_data</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="n">map_pb2</span><span class="o">.</span><span class="n">WaypointSnapshot</span><span class="p">)</span>


<span class="k">def</span> <span class="nf">_get_streamed_edge_snapshot</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Reads a streamed response to recreate an edge snapshot.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">_get_streamed_data</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="n">map_pb2</span><span class="o">.</span><span class="n">EdgeSnapshot</span><span class="p">)</span>


<span class="n">_UPLOAD_GRAPH_STATUS_TO_ERROR</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">defaultdict</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="p">(</span><span class="n">ResponseError</span><span class="p">,</span> <span class="kc">None</span><span class="p">))</span>
<span class="n">_UPLOAD_GRAPH_STATUS_TO_ERROR</span><span class="o">.</span><span class="n">update</span><span class="p">({</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadGraphResponse</span><span class="o">.</span><span class="n">STATUS_OK</span><span class="p">:</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadGraphResponse</span><span class="o">.</span><span class="n">STATUS_MAP_TOO_LARGE_LICENSE</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">MapTooLargeLicenseError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadGraphResponse</span><span class="o">.</span><span class="n">STATUS_INVALID_GRAPH</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">InvalidGraphError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadGraphResponse</span><span class="o">.</span><span class="n">STATUS_INCOMPATIBLE_SENSORS</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">IncompatibleSensorsError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadGraphResponse</span><span class="o">.</span><span class="n">STATUS_AREA_CALLBACK_ERROR</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">AreaCallbackMapError</span><span class="p">),</span>
<span class="p">})</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_lease_use_result_errors</span>
<span class="nd">@handle_license_errors_if_present</span>
<span class="nd">@handle_unset_status_error</span><span class="p">(</span><span class="n">unset</span><span class="o">=</span><span class="s1">&#39;STATUS_UNKNOWN&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_upload_graph_error</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return a custom exception based on upload graph response, None if no error.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">error_factory</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span>
                         <span class="n">status_to_string</span><span class="o">=</span><span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadGraphResponse</span><span class="o">.</span><span class="n">Status</span><span class="o">.</span><span class="n">Name</span><span class="p">,</span>
                         <span class="n">status_to_error</span><span class="o">=</span><span class="n">_UPLOAD_GRAPH_STATUS_TO_ERROR</span><span class="p">)</span>


<span class="n">_UPLOAD_WAYPOINT_SNAPSHOT_TO_ERROR</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">defaultdict</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="p">(</span><span class="n">ResponseError</span><span class="p">,</span> <span class="kc">None</span><span class="p">))</span>
<span class="n">_UPLOAD_WAYPOINT_SNAPSHOT_TO_ERROR</span><span class="o">.</span><span class="n">update</span><span class="p">({</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadWaypointSnapshotResponse</span><span class="o">.</span><span class="n">STATUS_UNKNOWN</span><span class="p">:</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadWaypointSnapshotResponse</span><span class="o">.</span><span class="n">STATUS_OK</span><span class="p">:</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadWaypointSnapshotResponse</span><span class="o">.</span><span class="n">STATUS_INCOMPATIBLE_SENSORS</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">IncompatibleSensorsError</span><span class="p">)</span>
<span class="p">})</span>

<span class="n">_CLEAR_GRAPH_STATUS_TO_ERROR</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">defaultdict</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="p">(</span><span class="n">ResponseError</span><span class="p">,</span> <span class="kc">None</span><span class="p">))</span>
<span class="n">_CLEAR_GRAPH_STATUS_TO_ERROR</span><span class="o">.</span><span class="n">update</span><span class="p">({</span>
    <span class="c1"># Unknown should not produce an error for backwards compatibility purposes (introduced in 3.1).</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">ClearGraphResponse</span><span class="o">.</span><span class="n">STATUS_UNKNOWN</span><span class="p">:</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">ClearGraphResponse</span><span class="o">.</span><span class="n">STATUS_OK</span><span class="p">:</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">ClearGraphResponse</span><span class="o">.</span><span class="n">STATUS_RECORDING</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">CannotModifyMapDuringRecordingError</span><span class="p">),</span>
<span class="p">})</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_lease_use_result_errors</span>
<span class="k">def</span> <span class="nf">_clear_graph_error</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return a custom exception based on upload graph response, None if no error.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">error_factory</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span>
                         <span class="n">status_to_string</span><span class="o">=</span><span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">ClearGraphResponse</span><span class="o">.</span><span class="n">Status</span><span class="o">.</span><span class="n">Name</span><span class="p">,</span>
                         <span class="n">status_to_error</span><span class="o">=</span><span class="n">_CLEAR_GRAPH_STATUS_TO_ERROR</span><span class="p">)</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_lease_use_result_errors</span>
<span class="k">def</span> <span class="nf">_upload_waypoint_snapshot_error</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return a custom exception based on upload graph response, None if no error.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">error_factory</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span>
                         <span class="n">status_to_string</span><span class="o">=</span><span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">UploadWaypointSnapshotResponse</span><span class="o">.</span><span class="n">Status</span><span class="o">.</span><span class="n">Name</span><span class="p">,</span>
                         <span class="n">status_to_error</span><span class="o">=</span><span class="n">_UPLOAD_WAYPOINT_SNAPSHOT_TO_ERROR</span><span class="p">)</span>


<span class="n">_SET_LOCALIZATION_STATUS_TO_ERROR</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">defaultdict</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="p">(</span><span class="n">ResponseError</span><span class="p">,</span> <span class="kc">None</span><span class="p">))</span>
<span class="n">_SET_LOCALIZATION_STATUS_TO_ERROR</span><span class="o">.</span><span class="n">update</span><span class="p">({</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationResponse</span><span class="o">.</span><span class="n">STATUS_OK</span><span class="p">:</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationResponse</span><span class="o">.</span><span class="n">STATUS_ROBOT_IMPAIRED</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotFaultedError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationResponse</span><span class="o">.</span><span class="n">STATUS_UNKNOWN_WAYPOINT</span><span class="p">:</span>
        <span class="p">(</span><span class="n">UnknownMapInformationError</span><span class="p">,</span>
         <span class="n">UnknownMapInformationError</span><span class="o">.</span><span class="vm">__doc__</span> <span class="o">+</span> <span class="s2">&quot; The waypoint is unknown.&quot;</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationResponse</span><span class="o">.</span><span class="n">STATUS_ABORTED</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RequestAbortedError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationResponse</span><span class="o">.</span><span class="n">STATUS_FAILED</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RequestFailedError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationResponse</span><span class="o">.</span><span class="n">STATUS_INCOMPATIBLE_SENSORS</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">IncompatibleSensorsError</span><span class="p">)</span>
<span class="p">})</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_lease_use_result_errors</span>
<span class="nd">@handle_unset_status_error</span><span class="p">(</span><span class="n">unset</span><span class="o">=</span><span class="s1">&#39;STATUS_UNKNOWN&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_set_localization_error</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return a custom exception based on set localization response, None if no error.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">error_factory</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span>
                         <span class="n">status_to_string</span><span class="o">=</span><span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">SetLocalizationResponse</span><span class="o">.</span><span class="n">Status</span><span class="o">.</span><span class="n">Name</span><span class="p">,</span>
                         <span class="n">status_to_error</span><span class="o">=</span><span class="n">_SET_LOCALIZATION_STATUS_TO_ERROR</span><span class="p">)</span>


<span class="n">_NAVIGATE_ROUTE_STATUS_TO_ERROR</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">defaultdict</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="p">(</span><span class="n">ResponseError</span><span class="p">,</span> <span class="kc">None</span><span class="p">))</span>
<span class="n">_NAVIGATE_ROUTE_STATUS_TO_ERROR</span><span class="o">.</span><span class="n">update</span><span class="p">({</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_OK</span><span class="p">:</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_NO_TIMESYNC</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">NoTimeSyncError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_EXPIRED</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">CommandExpiredError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_TOO_DISTANT</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">TooDistantError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_ROBOT_IMPAIRED</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotImpairedError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_RECORDING</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">IsRecordingError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_UNKNOWN_ROUTE_ELEMENTS</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">UnknownRouteElementsError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_INVALID_EDGE</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">InvalidEdgeError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_NO_PATH</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">NoPathError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_CONSTRAINT_FAULT</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">ConstraintFaultError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_FEATURE_DESERT</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">FeatureDesertError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_LOST</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotLostError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_NOT_LOCALIZED_TO_ROUTE</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotNotLocalizedToRouteError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_NOT_LOCALIZED_TO_MAP</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotNotLocalizedToRouteError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_COULD_NOT_UPDATE_ROUTE</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RouteNotUpdatingError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_STUCK</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotStuckError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_UNRECOGNIZED_COMMAND</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">UnrecognizedCommandError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">STATUS_AREA_CALLBACK_ERROR</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">AreaCallbackMapError</span><span class="p">),</span>
<span class="p">})</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_lease_use_result_errors</span>
<span class="nd">@handle_unset_status_error</span><span class="p">(</span><span class="n">unset</span><span class="o">=</span><span class="s1">&#39;STATUS_UNKNOWN&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_navigate_route_error</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return a custom exception based on navigate route response, None if no error.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">error_factory</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span>
                         <span class="n">status_to_string</span><span class="o">=</span><span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateRouteResponse</span><span class="o">.</span><span class="n">Status</span><span class="o">.</span><span class="n">Name</span><span class="p">,</span>
                         <span class="n">status_to_error</span><span class="o">=</span><span class="n">_NAVIGATE_ROUTE_STATUS_TO_ERROR</span><span class="p">)</span>


<span class="n">_NAVIGATE_TO_STATUS_TO_ERROR</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">defaultdict</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="p">(</span><span class="n">ResponseError</span><span class="p">,</span> <span class="kc">None</span><span class="p">))</span>
<span class="n">_NAVIGATE_TO_STATUS_TO_ERROR</span><span class="o">.</span><span class="n">update</span><span class="p">({</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_OK</span><span class="p">:</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_NO_TIMESYNC</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">NoTimeSyncError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_EXPIRED</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">CommandExpiredError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_TOO_DISTANT</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">TooDistantError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_ROBOT_IMPAIRED</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotImpairedError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_RECORDING</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">IsRecordingError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_NO_PATH</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">NoPathError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_UNKNOWN_WAYPOINT</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">UnknownWaypointError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_FEATURE_DESERT</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">FeatureDesertError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_LOST</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotLostError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_NOT_LOCALIZED_TO_MAP</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotNotLocalizedToRouteError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_COULD_NOT_UPDATE_ROUTE</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RouteNotUpdatingError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_STUCK</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotStuckError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_UNRECOGNIZED_COMMAND</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">UnrecognizedCommandError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">STATUS_AREA_CALLBACK_ERROR</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">AreaCallbackMapError</span><span class="p">),</span>
<span class="p">})</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_lease_use_result_errors</span>
<span class="nd">@handle_unset_status_error</span><span class="p">(</span><span class="n">unset</span><span class="o">=</span><span class="s1">&#39;STATUS_UNKNOWN&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_navigate_to_error</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return a custom exception based on navigate to response, None if no error.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">error_factory</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span>
                         <span class="n">status_to_string</span><span class="o">=</span><span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToResponse</span><span class="o">.</span><span class="n">Status</span><span class="o">.</span><span class="n">Name</span><span class="p">,</span>
                         <span class="n">status_to_error</span><span class="o">=</span><span class="n">_NAVIGATE_TO_STATUS_TO_ERROR</span><span class="p">)</span>


<span class="n">_NAVIGATE_TO_ANCHOR_STATUS_TO_ERROR</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">defaultdict</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="p">(</span><span class="n">ResponseError</span><span class="p">,</span> <span class="kc">None</span><span class="p">))</span>
<span class="n">_NAVIGATE_TO_ANCHOR_STATUS_TO_ERROR</span><span class="o">.</span><span class="n">update</span><span class="p">({</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_OK</span><span class="p">:</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_NO_TIMESYNC</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">NoTimeSyncError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_EXPIRED</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">CommandExpiredError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_TOO_DISTANT</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">TooDistantError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_ROBOT_IMPAIRED</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotImpairedError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_RECORDING</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">IsRecordingError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_NO_PATH</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">NoPathError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_NO_ANCHORING</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">NoAnchoringError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_FEATURE_DESERT</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">FeatureDesertError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_LOST</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotLostError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_NOT_LOCALIZED_TO_MAP</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotNotLocalizedToRouteError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_COULD_NOT_UPDATE_ROUTE</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RouteNotUpdatingError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_STUCK</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">RobotStuckError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_INVALID_POSE</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">InvalidPoseError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_UNRECOGNIZED_COMMAND</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">UnrecognizedCommandError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_AREA_CALLBACK_ERROR</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">AreaCallbackMapError</span><span class="p">),</span>
    <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">STATUS_INVALID_GPS_COMMAND</span><span class="p">:</span>
        <span class="n">error_pair</span><span class="p">(</span><span class="n">InvalidGPSError</span><span class="p">)</span>
<span class="p">})</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_lease_use_result_errors</span>
<span class="nd">@handle_unset_status_error</span><span class="p">(</span><span class="n">unset</span><span class="o">=</span><span class="s1">&#39;STATUS_UNKNOWN&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_navigate_to_anchor_error</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return a custom exception based on navigate to anchor response, None if no error.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">error_factory</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span>
                         <span class="n">status_to_string</span><span class="o">=</span><span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">NavigateToAnchorResponse</span><span class="o">.</span><span class="n">Status</span><span class="o">.</span><span class="n">Name</span><span class="p">,</span>
                         <span class="n">status_to_error</span><span class="o">=</span><span class="n">_NAVIGATE_TO_ANCHOR_STATUS_TO_ERROR</span><span class="p">)</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_unset_status_error</span><span class="p">(</span><span class="n">unset</span><span class="o">=</span><span class="s1">&#39;STATUS_UNKNOWN&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_navigate_feedback_error</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return a custom exception based on navigate to response, None if no error.&quot;&quot;&quot;</span>
    <span class="c1"># If the common response header is OK and the status is set, no error.</span>
    <span class="k">return</span> <span class="kc">None</span>




<span class="nd">@handle_common_header_errors</span>
<span class="k">def</span> <span class="nf">_download_graph_stream_errors</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return a custom exception based on download graph streaming response, None if no error.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="kc">None</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_unset_status_error</span><span class="p">(</span><span class="n">unset</span><span class="o">=</span><span class="s1">&#39;STATUS_UNKNOWN&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_download_waypoint_snapshot_stream_errors</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return a custom exception based on download waypoint snapshot streaming response, None if no error.&quot;&quot;&quot;</span>
    <span class="c1"># Iterate through the response since the download request responds with a stream.</span>
    <span class="k">for</span> <span class="n">resp</span> <span class="ow">in</span> <span class="n">response</span><span class="p">:</span>
        <span class="c1"># Handle error statuses from the request.</span>
        <span class="k">if</span> <span class="p">(</span><span class="n">resp</span><span class="o">.</span><span class="n">status</span> <span class="o">==</span>
                <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">DownloadWaypointSnapshotResponse</span><span class="o">.</span><span class="n">STATUS_SNAPSHOT_DOES_NOT_EXIST</span><span class="p">):</span>
            <span class="k">return</span> <span class="n">UnknownMapInformationError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="n">resp</span><span class="p">,</span>
                                              <span class="n">error_message</span><span class="o">=</span><span class="n">UnknownMapInformationError</span><span class="o">.</span><span class="vm">__doc__</span><span class="p">)</span>
    <span class="c1"># All responses (in the iterator) had status_ok</span>
    <span class="k">return</span> <span class="kc">None</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_unset_status_error</span><span class="p">(</span><span class="n">unset</span><span class="o">=</span><span class="s1">&#39;STATUS_UNKNOWN&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_download_edge_snapshot_stream_errors</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return a custom exception based on download edge snapshot streaming response, None if no error.&quot;&quot;&quot;</span>
    <span class="c1"># Iterate through the response since the download request responds with a stream.</span>
    <span class="k">for</span> <span class="n">resp</span> <span class="ow">in</span> <span class="n">response</span><span class="p">:</span>
        <span class="c1"># Handle error statuses from the request.</span>
        <span class="k">if</span> <span class="p">(</span><span class="n">resp</span><span class="o">.</span><span class="n">status</span> <span class="o">==</span> <span class="n">graph_nav_pb2</span><span class="o">.</span><span class="n">DownloadEdgeSnapshotResponse</span><span class="o">.</span><span class="n">STATUS_SNAPSHOT_DOES_NOT_EXIST</span>
           <span class="p">):</span>
            <span class="k">return</span> <span class="n">UnknownMapInformationError</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="n">resp</span><span class="p">,</span>
                                              <span class="n">error_message</span><span class="o">=</span><span class="n">UnknownMapInformationError</span><span class="o">.</span><span class="vm">__doc__</span><span class="p">)</span>
    <span class="c1"># All responses (in the iterator) had status_ok</span>
    <span class="k">return</span> <span class="kc">None</span>
</pre></div>

           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
      
      &copy; Copyright 2025 Boston Dynamics. All rights reserved.
      <a href="https://www.bostondynamics.com/privacy-policy">Privacy Policy</a> | 
      <a href="https://www.bostondynamics.com/terms">Terms of Use</a>

    </p>
  </div> 

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(false);
      });
  </script>
    <!-- Theme Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXX-1"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'UA-XXXXXXX-1', {
          'anonymize_ip': false,
      });
    </script> 

</body>
</html>